These are chat archives for japgolly/scalacss

27th
Jun 2015
Knut Petter Meen
@kpmeen
Jun 27 2015 09:09

hullo,

Quick question…
I’m trying to apply a content property to a pseudo-element like this content := “”, but it keeps rendering as this content: ; and not content: “”; as I would expect. Which means the property isn’t applied in the browser.
Am I doing something wrong? How do I get the content property to use the correct “” value?

Knut Petter Meen
@kpmeen
Jun 27 2015 09:31
Ah…ok…I figured it out. Had to write content := “\”\””
kpmeen @kpmeen not exactly a CSS guru :-p
Øyvind Raddum Berg
@oyvindberg
Jun 27 2015 17:57
I'm trying to port over some css which uses a webkit-specific media query hack, ie the one mentioned in http://stackoverflow.com/questions/4104004/whats-the-semantic-of-media-screen-and-webkit-min-device-pixel-ratio0
so i tried this
val webkitOnly  = media.screen & Pseudo.Custom("-webkit-min-device-pixel-ratio:0", PseudoClass)
but no browsers seem to pick that up (it works with only screen)
Øyvind Raddum Berg
@oyvindberg
Jun 27 2015 18:23
any ideas? :)
Øyvind Raddum Berg
@oyvindberg
Jun 27 2015 18:31
i also ran into the same issue as @kpmeen by the way, i was also expecting that to yield content: ""
is it useful in css to declare an attribute with no value? if not, perhaps we could change the default behaviour there
Knut Petter Meen
@kpmeen
Jun 27 2015 18:35
Maybe, for the content attribute, it would be usefull to have something like content.empty (like e.g. display.inline etc…) that would render content: “”; ?
…at least from what I’ve seen, content: “” is used quite a bit to acheive some CSS wizardry.
Øyvind Raddum Berg
@oyvindberg
Jun 27 2015 18:37
yeah, but is content: ; ever useful?
I'm also not good with css, hehe
Knut Petter Meen
@kpmeen
Jun 27 2015 18:38
:-p Who is?
Øyvind Raddum Berg
@oyvindberg
Jun 27 2015 18:38
hehehe
Knut Petter Meen
@kpmeen
Jun 27 2015 18:38
At least my chrome dev console shows a big warning sign for that construct
…so I do think it is ignored
Øyvind Raddum Berg
@oyvindberg
Jun 27 2015 18:39
right, in that sense i would think the rendering of empty strings could be changed to solve that particular problem
@japgolly would you agree? ^
Knut Petter Meen
@kpmeen
Jun 27 2015 19:25
@elacin Another behaviour from the chrome dev console that would underline that thought, is that; if you remove the value from any style attribute…the entire attribute goes away.
Øyvind Raddum Berg
@oyvindberg
Jun 27 2015 20:08
yeah think i also saw that