Last active
August 29, 2015 14:17
-
-
Save adikahorvath/0ad9e4e13adff53f4ff1 to your computer and use it in GitHub Desktop.
regex CSS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* if contains "post" */ | |
div[class*="post"] { | |
color: red; | |
} | |
/* if begins with "post" */ | |
div[class^="post"] { | |
color: red; | |
} | |
/* if ends with "post" */ | |
div[class$="post"] { | |
color: red; | |
} | |
/* if space separated "post" */ | |
div[class~="post"] { | |
color: red; | |
} | |
/* if dashed "post" */ | |
div[class|="post"] { | |
color: red; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- if contains "post" --> | |
<div class="post-45"></div> | |
<div class="last-post"></div> | |
<div class="last-post-with-picture"></div> | |
<!-- if begins with "post" --> | |
<div class="post-45 col-3"></div> | |
<!-- if ends with "post" --> | |
<div class="col-3 with-picture 45-post"></div> | |
<!-- if space separated "post" --> | |
<div class="col-3 post with-picture"></div> | |
<!-- if dashed "post" --> | |
<div class="last-post-with-picture"></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment