Change of flipdown.css styles to CSS variables #36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
thank you for the great plugin!
I've used it in my latest project and I liked it but restyling wasn't very comfortable. Had to change same values in many places + change them for different screen sizes, etc. That's a lot of work, so I rewrote flipdown.css styles using CSS variables and now all styles can be changed in one place. The whole look can be altered with a couple of variables. I also removed media query rules from CSS since every project has its own media query breakpoints and there is no more need to show which rules should be changed with media queries since the size is now changed with one variable.
For example,
will make flipdown 2 times smaller (initial --rotor-base is equal to 100px for simpler calculations)
Other sizes are changed with multipliers.
For example, widths of rotors can be changed by changing "0.5" in a variable
--rotor-width: calc(var(--rotor-base) * 0.5);
. 100px * 0.5 = 50px.The colors can be changed pretty easy too by altering these variables
that represent HSL (Hue, Saturation, Lightness) model
https://css-tricks.com/hsl-hsla-is-great-for-programmatic-color-control/
Feel free to ask any questions!