Skip to content

Instantly share code, notes, and snippets.

View ericwbailey's full-sized avatar

Eric Bailey ericwbailey

View GitHub Profile
@ericwbailey
ericwbailey / _c.scss
Created May 29, 2019 19:45
#writing #thoughtbot
@function c(
$name,
$theme:null,
$component:null,
) {
// Retrieve a palette color value
@if ($theme == null) and ($component == null) {
@return map-get($colors, $name);
}
// Retrieve a component color value
@ericwbailey
ericwbailey / _c-tab.scss
Created May 29, 2019 19:48
#writing #thoughtbot
.c-tab {
border: 1px solid c(tab, border);
color: c(tab, type);
padding: 1rem 3rem;
a {
color: c(tab, link);
}
}
@ericwbailey
ericwbailey / _variables.scss
Created May 29, 2019 19:49
#writing #thoughtbot
$crimson: #a51c30;
// Other color variables
$brand-primary: $crimson;
@ericwbailey
ericwbailey / _component.scss
Created May 29, 2019 19:50
#writing #thoughtbot
$_color-outline: saturate($brand-primary, 20%);
.component {
border: 2px solid $color-outline;
// Other component code
}
@ericwbailey
ericwbailey / _colors.scss
Created May 29, 2019 19:51
#writing #thoughtbot
$colors: (
brand-primary: #6b9cdd,
brand-secondary: #ffadfa,
brand-tertiary: #fed5d8,
tab (
background: #6b9cdd,
border: #00e2ff,
link: #ffffe7,
link-hover: #ffd5d9,
@ericwbailey
ericwbailey / _c-tab.scss
Created May 29, 2019 19:54
#writing #thoughtbot
.c-tab {
color: c(tab, type);
border: 1px solid c(tab, border);
padding: 1rem 3rem;
@media (prefers-color-scheme: dark) {
background-color: c(tab, dark-theme, background);
}
a {
@ericwbailey
ericwbailey / _colors.scss
Created May 29, 2019 19:54
#writing #thoughtbot
$colors: (
tab (
background: #6b9cdd,
border: #00e2ff,
link: #ffffe7,
link-hover: #ffd5d9,
link-active: #ffadfb,
type: #ffffff,
dark-theme: (
@ericwbailey
ericwbailey / _root.scss
Created May 29, 2019 19:59
#writing #thoughtbot
:root {
--color-tab-link: #007aff;
// Other CSS Custom property declarations
}
@ericwbailey
ericwbailey / _c-tab.scss
Created May 29, 2019 19:59
#writing #thoughtbot
.c-tab {
color: var(--color-tab-type);
// Other component declarations
@media (prefers-color-scheme: dark) {
--color-tab-link: #ffffff;
color: var(--color-tab-link)
// Other component theme tweaks
}
@ericwbailey
ericwbailey / Resources.md
Last active June 19, 2021 12:52
Accessibility at Scale resources: noti.st/ericwbailey/bYNh0Y/accessibility-at-scale #talk #enterjs