-
-
Notifications
You must be signed in to change notification settings - Fork 0
0.4 libraries
Composing libraries is essentially like managing a set of CSS files—sensibly grouping classes and naming them according to established standards. This approach ensures clarity, maintainability, and consistency across your stylesheets.
Well-structured grouping and naming conventions help in scalable CSS architecture and make it easier to extend or modify the libraries over time.
{group}.{order}.{name}.css
-
group :
string[A-Z a-z 0-9 -] -
order :
0|1|2 -
name :
string[A-Z a-z 0-9 -]
{group}{'$'*order}{Normalized(selector)}
The classes defined in this file are accessed from other files using the following symbolic class references.
/* anim.1.animation.css */
.none {
transition: none;
} /* Symlink: anim$none */
.all {
transition: all 300ms ease;
} /* Symlink: anim$all */
.transform {
transition: transform 300ms ease;
} /* Symlink: anim$transform */
.opacity {
transition: opacity 300ms ease;
} /* Symlink: anim$opacity */
.fade-in {
@--attach anim$_keyframes_fade-in;
animation-name: fade-in;
} /* Symlink: anim$fade-in */
@keyframes fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
} /* Symlink: anim$_keyframes_fade-in */All the first order blocks of each file will have a corresponding symbolic class generated. This will be use full in cases where custom rule block has to be linked with classes.
.classname {
@--apply $class-1 $class-2 $class-1;
@--attach $attach-1 $attach-2;
}- Compose styles from predefined classes from libraries using symlinks.
- Values derived from this action is overridden by explicit properties
- Creates dependency with other classes using its symbolic-class representation.
- Library classes have dependent-style and composable-style of same value.
-
orderis the hierarchy level for library inheritance. Lower order files provide base/axiom styles; higher order files can reference and extend lower orders. Useorderto control applyment (@--apply) and attachment (@--attach) visibility and override behavior.
- Provided editor intergration are aware of these libraries and give only appropriate suggestions according to active files.
-
group='' -
A special group without a group-name. ( Example: 0.display.css )
-
In a file of Order
n, symbolic classes may be referenced from other files using two distinct directives, with in the scope ofaxiomwhere permitted sources are:-
@--apply: Files of Order ≤ n−1 -
@--attach: Files of Order ≤ n
-
- Named groups can access all symbolic classes from Axioms.
- In a file of Order
n, symbolic classes may be referenced from other files using two distinct directives, with in the scope of wholeaxiomandgroupwere permitted sources are:-
@--apply: Files of Order ≤ n−1 -
@--attach: Files of Order ≤ n
-
Alchira Wiki · © 2025 Vyshnav Prasad
Built with ❤️ for vanilla web
Get Started · Tutorial · Discussions
· · ·