question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Option for className or class?

See original GitHub issue

https://github.com/cristianbote/goober/blob/831917013b16141d08feb1b88a304da5ee69269f/src/styled.js#L21

It would be great if we could utilise class instead of className

I utilize class as I’m writing direct one to one with static html

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
cristianbotecommented, Oct 2, 2019

I’m glad you can use the css. Fun fact, styled uses the same css internally 😄 and just returns the className.

0reactions
fabiancookcommented, Oct 2, 2019

As a reference as well, because I’m targeting only static html, the difference of setAttribute and setting the property doesn’t change too much for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML option class Attribute - Dofactory
The class attribute assigns one or more classnames to the <option> tag. Classnames are defined in a stylesheet or in a local <style>...
Read more >
Why React uses className over class attribute
Explanation: The only reason behind the fact that it uses className over class is that the class is a reserved keyword in JavaScript...
Read more >
get class name of a selected option - jquery - Stack Overflow
The selected selector is applicable for option , not for the select so $('select[name="platform"] :selected').attr('class'). Demo: Fiddle.
Read more >
Element.className - Web APIs | MDN
The className property of the Element interface gets and sets the value of the class attribute of the specified element.
Read more >
JSX: add option to use "class" instead of "className"
JSX: add option to use "class" instead of "className" · Type class in JSX · PhpStorm more or less automatically expands to React's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found