css
Version, currently 0.1.07 versions
github.com/sbsoftware/css.cr
Create CSS stylesheets in pure Crystal
Nothing has been indexed for 0.1.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
css:
github: sbsoftware/css.cr
version: ~> 0.1.0Then run:
shards installshard.yml
No shard.yml has been indexed for 0.1.0. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
css.cr
Create CSS stylesheets in pure Crystal.
Installation
-
Add the dependency to your
shard.yml:dependencies: css: github: sbsoftware/css.cr -
Run
shards install.
Quick Start
require "css"
class Style < CSS::Stylesheet
rule div do
display :block
padding 12.px
end
end
puts Style
Output:
div {
display: block;
padding: 12px;
}
Documentation
Task-focused guides live in docs/:
- Getting Started
- Selectors
- Nesting
- Media Queries
- Units and calc()
- Gradients and Colors
- Fonts and @font-face
- Using !important
- Examples Gallery (copy/paste-ready DSL + rendered CSS)
- Cookbook (idiomatic patterns + CSS <-> Crystal hints)
- API Reference Summary
- Contributor Guide: Adding Properties and Enums
Coverage Index
Generate the MDN-vs-shard coverage index:
crystal scripts/generate_coverage.cr
The generated report is committed at COVERAGE.md and includes:
- supported/unsupported/missing MDN property coverage,
- typed enum coverage for enum-applicable properties,
- unsupported string-only properties,
- a checklist for adding missing CSS.
Contributing
Use the contributor docs in docs/contributing-properties-and-enums.md for implementation details.
- Fork it (https://github.com/sbsoftware/css.cr/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Stefan Bilharz - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.0- Tagged
- Aug 2, 2026
- Commit
49673367f882- Indexed
- not yet
Dependents
Repository
github.com/sbsoftware/css.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 16, 2026
- Synced
- Aug 16, 2026
- Versions
- 7