You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rather than generating statically defined colors tied to Tachyons named values, we would be better to define colour suites and type and spacing scales in maps. The current arrangement is a carryover from Tachyons-sass.
Desirables:
-- any 'module' should be replaceable and over-rideable.
-- new definitions should be picked up by the build system with minimal user intervention.
-- sass definition lists should be translated into CSS custom properties as well, and these used in the rules instead of sass vars.
-- property generators and breakpoint generators should be composeable.
Color scales especially could create significant bloat if all hovers links etc were generated for each gradient step, so we should explore how we can offer some granularity.
/** * Use this mixin to declare a set of CSS Custom Properties. * The variables in $css_variables will be properly prefixed. * The use of this mixin is encoraged to keep a good scalability. * * Usage: * * @include cssvars(( * base-font-size: 65.5%, * font-family: #{"HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif}, * * primary-color: #33b5e5, * secondary-color: #ff500a, * )); * * Will result in * * root { * --prefix-var-name: value; * --prefix-var-name: value; * --prefix-var-name: value; * } **/@mixincssvars($css_property, $prefix: haru) {
:root {
@each $name, $valuein $css_property {
--#{$prefix}-#{$name}: #{$value};
}
}
}
The text was updated successfully, but these errors were encountered:
Rather than generating statically defined colors tied to Tachyons named values, we would be better to define colour suites and type and spacing scales in maps. The current arrangement is a carryover from Tachyons-sass.
Desirables:
-- any 'module' should be replaceable and over-rideable.
-- new definitions should be picked up by the build system with minimal user intervention.
-- sass definition lists should be translated into CSS custom properties as well, and these used in the rules instead of sass vars.
-- property generators and breakpoint generators should be composeable.
Color scales especially could create significant bloat if all hovers links etc were generated for each gradient step, so we should explore how we can offer some granularity.
See also: sass
color.scale()
https://medium.com/teutonic-css/css-vars-or-sass-vars-use-both-b84cf70e2c66
Prior art:
Sarah Dayan:
https://gist.github.com/sarahdayan/4d2cc04a636e8039f10a889a0e29fbd9
Our current breakpoint generator:
Example of a CSS custom property generator:
The text was updated successfully, but these errors were encountered: