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
/** | |
* CSS variables test | |
*/ | |
html { background: red } | |
@supports (--variables: yes) { /* any variable and any value works */ | |
/* Code here will only be applied in CSS variable-supporting UAs */ | |
html { | |
background: green; |
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
/** | |
* heading decorated | |
*/ | |
html | |
{ | |
height: 100%; | |
background: linear-gradient( | |
to right bottom, | |
yellow, |
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
/** | |
* keyboard order and flexbox ordering | |
*/ | |
nav { | |
display: flex; | |
padding: 20px; | |
} | |
a:nth-of-type(2) { | |
order: -1; |
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
/** | |
* Scrolling hints | |
*/ | |
ul { | |
display: inline-block; | |
overflow: auto; | |
width: 7.2em; | |
height: 7em; | |
border: 1px solid silver; |
Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element
or the /deep/
path selector.
video::webkit-media-controls-timeline {
background-color: lime;
}
video /deep/ input[type=range] {
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
<!-- BEM --> | |
<div class="section__item section__item--someoption grid__row grid__row--gutter"> | |
<div class="grid__item grid__item--small1 grid__item--wide3"> | |
Some content | |
</div> | |
</div> | |
<!-- Suit CSS --> | |
<div class="Section-item Section-item--someoption Grid-row Grid-row--gutter"> |
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
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> | |
</a><div class="shopping-cartTag"><a href="#"><i class="fa fa-shopping-cart fa-3x"></i></a></div> | |
<a href="#" class="button blue-button" class="ripplelink"> | |
<h3 class="button-title">Product One</h3> | |
<div class="button-description">The item description goes here</div> | |
<div class="button-price">$5</div> | |
<div class="button-arrow"></div> | |
</a> |
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
table { display: table } | |
tr { display: table-row } | |
thead { display: table-header-group } | |
tbody { display: table-row-group } | |
tfoot { display: table-footer-group } | |
col { display: table-column } | |
colgroup { display: table-column-group } | |
td, th { display: table-cell } | |
caption { display: table-caption } |
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
/** | |
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units | |
* | |
* To overcome this, create media queries that target the width, height, and orientation of iOS devices. | |
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing | |
* the height of element `.foo` —which is a full width and height cover image. | |
* | |
* iOS Resolution Quick Reference: http://www.iosres.com/ | |
*/ | |