Thursday, May 01, 2014

WDC 1.3 power of css selectors

css actually really powerful not only for styling page

* beyond classes and id
using attribute instead of classes

end with substring
[foo$=bar]

e.g put the image for file type

:not()
style everything except h1

--
u can test for testing e.g if doesn't have alt. give red border

e.g if table no summary

--
:target to highlight href #
link and href

p:target 

e.g highlight href
- open accordion but a bit hacky.

--

u can use in jquery selector

--
css level 4 in the future

* !parentselector
!ul >active

*li:matches

* :localLink
if it is locallink (0 ) means root





No comments: