Last active
June 16, 2016 14:17
-
-
Save paultibbetts/49375d0e3327ed06fb2e1c9ce29cca41 to your computer and use it in GitHub Desktop.
WordPress classes in SCSS, set to Bootstrap defaults
This file contains 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
// WordPress Generated Classes | |
// http://codex.wordpress.org/CSS#WordPress_Generated_Classes | |
// Media alignment | |
.alignnone { | |
margin-left: 0; | |
margin-right: 0; | |
max-width: 100%; | |
height: auto; | |
} | |
.aligncenter { | |
display: block; | |
margin: 7.5px auto; | |
height: auto; | |
} | |
.alignleft, | |
.alignright { | |
margin-bottom: 7.5px; | |
height: auto; | |
} | |
@media (min-width: 767px) { | |
// Only float if not on an extra small device | |
.alignleft { | |
float: left; | |
margin-right: 7.5px; | |
} | |
.alignright { | |
float: right; | |
margin-left: 7.5px; | |
} | |
} | |
// Captions | |
.wp-caption { | |
background-color: #fff; | |
border: 1px solid #ddd; | |
border-radius: 4px; | |
display: block; | |
line-height: 1.428571429; | |
margin-bottom: 20px; | |
padding: 4px; | |
transition: border 200ms ease-in-out; | |
&.active, | |
&:focus, | |
&:hover { | |
border-color: #27ae60 | |
} | |
a > img, | |
& > img { | |
display: block; | |
height: auto; | |
max-width: 100%; | |
margin-left: auto; | |
margin-right: auto; | |
} | |
.caption { | |
padding: 9px; | |
color: #333 | |
} | |
} | |
.wp-caption-text { | |
padding: 7.5px; | |
} | |
// Text meant only for screen readers | |
.screen-reader-text { | |
position:absolute; | |
width:1px; | |
height:1px; | |
margin:-1px; | |
padding:0; | |
overflow:hidden; | |
clip:rect(0,0,0,0); | |
border:0; | |
&:active, | |
&:focus { | |
position:static; | |
width:auto; | |
height:auto; | |
margin:0; | |
overflow:visible; | |
clip:auto | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment