Unopinionated and Pragmatic Atomic CSS Generator.
Current version is 0.1.0-beta.1
. The first goal is to release version 0.1.0
in order to make this tool public. However, new versions could break compatibility with old versions until version 1.0 is reached.
- Basic CSS generator
- Basic modules
- !important
- Pseudo classes
- Pseudo elements
- Command line interface
- Watcher
- Add the type of value keyword, supporting
initial
,revert
,inherit
andunset
- Add missing modules
- Classes web search portal
- Improve values (length, number, etc)
- Leptons Collections like shadows
- Support standard HTML colors
- Collections
- Classes
- Components
- Negative lengths
- Display errors
- Documentation
- Website
- Support for array params like {length...}
- grid-template-rows and grid-template-columns with {length...}
- Display missing classes and duplicated classes
- Add support to themes, such as Dark theme
- Deprecation and backward compatibility plan
- Classes and components with functions
- Custom types
- External module system
source:
html:
- '*.htm'
- '*.html'
output: ./leptons.css
lengthType: rem
medias:
M: 'screen and (min-width: 48rem)'
L: 'screen and (min-width: 64rem)'
source: ...
output: ...
lengthType: ...
medias: ...
colors: ...
fonts: ...
shadows: ...
include: ...
aliases: ...
components: ...
classes: ...
collections: ...
css_before: ...
css_after: ...
The folowing code shows the specification for the syntax of the class names in Leptons.
[!]module[-attribute]-value[:pseudoClass][::pseudoElement][-media]
[]
brackets means optional. So, any class requires as minimun the module name and the value. Example: Inp-1px
, the characterp
represents the Padding module and1px
is the value. So this is builded as.p-1px { padding: 1px; }
module
the module name. Example: Inf-s-9px
, the characterf
represents the Font module, so this is builded as.f-s-12px { font-size: 9px; }
attribute
the attribute of the module to set. Example: inm-t-8px
,s
is the Top attribute of the Margin module, so this is builded as.m-t-8px { margin-top: 8px; }
value
the value assigned to the attribute. Example: int-a-c
,c
is the value assigned to the Align attribute of the Text module, so this is builded as.t-a-c { text-align: center; }
pseudoClass
one or multiple CSS pseudo classes assigned to the class. Example: int-dl-u:h
,:h
represents the:hover
css pseudo class, so this is builded as.t-dl-u\:h:hover { text-decoration-line: underline; }
!
the symbol to represent the!important
modifier in CSS. Example:!p-1px
is builded as.\!p-1px { padding: 1px !important; }
-
Character(s): a lowercase letter or combination of them.
Examples:
c
int-a-c
is thecenter
value for thealign
attribute of the Text modulelt
int-dl-u
is theunderline
value for thedecoration-line
attribute of the Text module
Characters, generally, have an equivalent long version name. Example:
t-a-c
can be written ast-a-center
t-dl-lt
can be written ast-dl-lineThrough
As you see in the example above, camelCase convention is used when the long name is composed for two or more words.
-
Length: a number followed by the type of length. Examples:
12px
inp-l-12px
is the12
value expressed in pixels for the Left attribute of the Padding module.1p
inm-t-1p
is the value 1 expressed in Percentage for the Top attribute of the Margin module.
-
Color: some attributes of some modules uses a color name as values. The name of the color must be defined in the
leptons.yaml
configuration file. Examples:black
int-c-black
is the value for theblack
entry defined in thecolors
collection of the config fileleptons.yaml
-
Font: some attributes of some modules uses a color name as values. The name of the color must be defined in the
leptons.yaml
configuration file. Examples:black
int-c-black
is the value for theblack
entry defined in thecolors
collection of the config fileleptons.yaml
-
Font: some attributes of some modules uses a color name as values. The name of the color must be defined in the
leptons.yaml
configuration file. Examples:black
int-c-black
is the value for theblack
entry defined in thecolors
collection of the config fileleptons.yaml
Copyright © 2019-2021 Carlos Forero
Atomic Styles is released under the MIT License.