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
/* type.css */ | |
@import 'vars.css'; | |
@define-mixin header { | |
font-family: $font-sans; | |
font-weight: 600; | |
letter-spacing: -0.01em; | |
} |
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
.userPreview { | |
border: solid $off-black; | |
&.--default { | |
border-width: 5px; | |
font-size: 1.5rem; | |
background: $light-gray; | |
} | |
&.--compact { |
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
.userPreview { | |
border: 5px solid $off-black; | |
font-size: 1.5rem; | |
background: $light-gray; | |
&.--compact { | |
border: 1px solid $off-black; | |
font-size: 1rem; | |
background: transparent; | |
} |
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
/* | |
Set default element styles | |
Based partially on sanitize.css v2.0.0 | |
github.com/jonathantneal/sanitize.css | |
*/ | |
*, | |
::before, | |
::after { | |
box-sizing: border-box; |
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
/* | |
Reset text elements for easy semantic use. | |
http://anthonyshort.me/global-typographic-styles-suck/ | |
*/ | |
/* Pseudo */ | |
:focus { | |
outline: none; | |
} |
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
<article styleName="userSummary --compact"> | |
<img styleName="image -loading" src="/low-res.jpg" /> | |
<div styleName="firstName">Mr. Jim</div> | |
<div styleName="lastName">Business</div> | |
</article> |
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
<article styleName='userList'> | |
<h1 styleName='title'>Friends</h1> | |
<ul styleName='users'> | |
<li styleName='user'> | |
<UserPreview user={1} compact={true} /> | |
</li> | |
<li styleName='user'> | |
<UserPreview user={2} compact={true} /> | |
</li> | |
<li styleName='user'> |
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
/* vars.css */ | |
$off-black: hsl(0, 0%, 14%); | |
$serif-family: "Charter BT", "Times New Roman", serif; | |
/* component style.css */ | |
@import 'vars.css'; | |
.firstName { |
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
.userSummary { | |
/* element rules */ | |
} | |
.image { | |
/* element rules */ | |
} | |
.firstName, | |
.lastName { |
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
.image { | |
/* element rules */ | |
&.-loading { | |
/* state rules */ | |
} | |
&.-loaded { | |
/* state rules */ | |
} |