What can be done to make changing colors easier? #15
-
One of the first things that I do for a website is taking an existing stylesheet and adjust it. Changing font is not difficult, you choose one and modify the top of a stylesheet. Changing colors is more work, you need to modify the CSS at different places, swear and listen to Ramstein. Maybe this can be improved with SASS/SCSS support... anyone has some experience using it? What can be done to make changing colors easier? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
There are many different CSS preprocessors out there that are passionately fought over. I don't think there is an advantage over another other than personal preferences and ego stuff :) The one thing we can all agree on though is that preprocessors are a great tool for maintaining a bigger codebase and part of a professional workflow. More to read for real world use: |
Beta Was this translation helpful? Give feedback.
-
Thanks Dominik! I wonder which CSS preprocessor is most popular, is there a big difference between LESS, Stylus and SASS? Anyone can recommend a PHP library that would work with Yellow, e.g. stable and not too big? |
Beta Was this translation helpful? Give feedback.
-
Hey. Well, my personal opinion is not to make any assumption on how devs want to work. I would keep this out of the framework as anyone can easily run their preferred preprocessors and feed it into the front-end code. To which library is more popular I would say Less and SCSS but who knows. Perhaps the best way to tackle this is to give users a grunt or gulp build in which they can elect to run whatever they want to. I'd be willing to bet that most front end devs have their own task runner setup anyway. For everyone else, preprocessors might be a bit too much anyway. |
Beta Was this translation helpful? Give feedback.
-
Personally i used the gulp task runner, it was clean and simple. Have anyone interessed on my gulp configuration file? |
Beta Was this translation helpful? Give feedback.
-
Gulp tutorialBefore the start install node.js
I personally used the following plugins: gulp-autoprefixer - Parse CSS and add vendor prefixes to CSS rules
// Include main components // Include CSS components // Include JS components // image components // Include utilities //Less Compilation //JS compilation //Image optimation //Watch for LESS, JS and Image changes and run the respective compilers automatically
}); //Default Task
|
Beta Was this translation helpful? Give feedback.
-
I have some good news, we switched to configurable colors in CSS. You can define text colors and backgrounds at the top of a stylesheet, which should make it super easy to customise a theme. It works with CSS variables. The next step is to add light and dark mode support to available themes, then we should be ready for everyday life. |
Beta Was this translation helpful? Give feedback.
I have some good news, we switched to configurable colors in CSS.
You can define text colors and backgrounds at the top of a stylesheet, which should make it super easy to customise a theme. It works with CSS variables. The next step is to add light and dark mode support to available themes, then we should be ready for everyday life.