simurai / simurai.com Goto Github PK
View Code? Open in Web Editor NEWsimurai's site
Home Page: simurai.com
License: MIT License
simurai's site
Home Page: simurai.com
License: MIT License
Hi,
Thanks for this great feature. Is there a way to apply this only to horizontal scrollbars? (and no to the vertical one)
Thanks,
Regards,
Fran Tortosa
We actually did the something like this with SCSS. There was a layout module, which defined the structure of the component (padding, size, animation) and defined a lot of color variables it used inside (for like border color) and their state-dependant variables (like hovered background color) and defined the basic color inheritances.
$color-button-default-background: #000 !default;
$color-button-default-text: #fff !default;
$color-button-hovered-background: $color-button-default-background !default;
$color-button-hovered-text: $color-button-default-text !default;
.button {
color: $color-button-default-text;
background: $color-button-default-background;
&:hover {
color: $color-button-hovered-text;
background: $color-button-hovered-background;
}
}
Next to it there was a color module for each color scheme, which defines the basic colors of the scheme and maps it to the component color variable.
/// raw colors
$schema-bright-red: #f00;
$schema-bright-blue: #00f;
$schema-bright-green: #0f0;
/// mapping
$color-button-default-background: $schema-bright-red !default;
$color-button-default-text: $schema-bright-blue !default;
$color-button-hovered-text: $schema-bright-yellow !default;
And then when you wanted to use a component with the color scheme, you have to import the two files in the proper order:
.theme-bright {
@import "schema-bright";
@import "component-layouts";
}
And because of the use of !default
not just in the layout, but in the schema as well, you can override basic colors of component colors at the import level:
.theme-bright--custom {
$color-bright-red: #e11;
$color-button-hovered-text: aquamarine;
@import "schema-bright";
@import "component-layouts";
}
Wow, so minimalistic but powerful! Thank you! I really like the Dark Sea together with the Vue syntax :)
One thing to keep in mind about filters, is that colour management is still terrible on the web. Many of the maths for various filters assume they are working on linear data (like blur), but css can only really handle sRGB colour, which means ugliness will show up.
Always check if your filter is adding or multiplying anything, because if it does, your colours will clip and look bad.
Which versions of Atom does this support?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.