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
<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 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
/* type.css */ | |
@import 'vars.css'; | |
@define-mixin header { | |
font-family: $font-sans; | |
font-weight: 600; | |
letter-spacing: -0.01em; | |
} |
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
<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 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
/* 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 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
.image { | |
/* element rules */ | |
&.-loading { | |
/* state rules */ | |
} | |
&.-loaded { | |
/* state rules */ | |
} |
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
.userSummary { | |
/* element rules */ | |
&.--compact { | |
/* modifier rules */ | |
} | |
} | |
.image { | |
/* element rules */ |
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
.userSummary { | |
/* element rules */ | |
} | |
.image { | |
/* element rules */ | |
} | |
.firstName, | |
.lastName { |
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
/* | |
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 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
/* | |
Reset text elements for easy semantic use. | |
http://anthonyshort.me/global-typographic-styles-suck/ | |
*/ | |
/* Pseudo */ | |
:focus { | |
outline: none; | |
} |
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
// Not the most expressive code, but it does the trick. | |
// Run with swap = true to test swapping doors. | |
const montyBurns = function (swap = false) { | |
let wins = 0; | |
for (let i = 0; i < 10000; i++) { | |
const doors = [ | |
'empty', | |
'empty', | |
'empty', |