Document the use of CSS vs inline styles

This commit is contained in:
Daniel Gasienica 2018-04-24 12:41:20 -04:00
parent fca8de16c8
commit 657a2d6149
1 changed files with 7 additions and 1 deletions

View File

@ -9,7 +9,13 @@
}
.iconButton {
// NOTE: Cannot move these to inline styles as hover breaks due to precedence:
// NOTE: Cannot move these to inline styles as hover breaks due to precedence.
// We use vanilla CSS-in-JS which outputs inline styles. The `:hover`
// pseudo-class cannot be expressed using vanilla CSS-in-JS, so we define it
// here. If we move the other properties to JS, they have higher precedence
// as they are inline and the `:hover` `background` change wont override the
// base `background` definition. Revisit this as we adopt a more sophisticated
// style system in the future:
background: transparent;
width: 50px;
height: 50px;