Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/oevgeny/css-vars-traits-demo

Versatile File Input Styling with CSS Variables
https://github.com/oevgeny/css-vars-traits-demo

css css-vars

Last synced: about 1 month ago
JSON representation

Versatile File Input Styling with CSS Variables

Awesome Lists containing this project

README

        

# Versatile Component Styling with CSS Variables

This is my take on using CSS variables to create versatile styling for web components. It uses three types of classes:

- `file-input`: a component class that defines the basic structure and functionality of a file input element.

- `*-var`: a trait class that provides variables with optional defaults along with necessary modifications for the css properties, such as colors, fonts, borders, etc.

- `primary, accent, thick ...`: modifier classes that change the values of the variables provided by the trait class, allowing for different variations of the component