da_css
Version, currently 4.1.111 versions
- 4.1.1latestFeb 11, 2018
- 4.1.0not indexedFeb 11, 2018
- 4.0.0not indexedFeb 11, 2018
- 3.0.1not indexedFeb 11, 2018
- 3.0.0not indexedFeb 11, 2018
- 2.2.0not indexedFeb 11, 2018
- 2.1.0not indexedFeb 11, 2018
- 2.0.0not indexedFeb 11, 2018
- 1.0.1not indexedFeb 11, 2018
- 1.0.0not indexedFeb 11, 2018
- 0.1.0not indexedFeb 11, 2018
github.com/da99/da_css.cr
My personal way of generating .css files using Crystal.
3 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
da_css:
github: da99/da_css.cr
version: ~> 4.1.1Then run:
shards installshard.yml
- Crystal
- no constraint declared
Dependencies
Development Dependencies
- da_spec*github: da99/da_spec.crdev
- inspect_bang*github: da99/inspect_bang.crdev
README
da_css.cr
The idea is to let users use a subset of CSS to upload their own CSS files while preventing CSS security vulnerabilities.
Security links:
- http://www.diaryofaninja.com/blog/2013/10/30/executing-javascript-inside-css-another-reason-to-whitelist-and-encode-user-input
- https://www.curesec.com/blog/article/blog/Reading-Data-via-CSS-Injection-180.html
- Guidelines:
- Don't allow resources to outside the site: url('http://...my.image.png')
- Can be used to track people and spread harmful code.
- Don't allow resources to outside the site: url('http://...my.image.png')
Example:
File input.css:
/* Setup vars: */
div { background-color: #fff; }
.empty {
border-radius(10px, 20px);
background { color: #000; }
font { size: 1em; }
font-size: 2em;
}
body {
padding: 20px 0 0 10em;
background {
color: #fcf;
repeat: no-repeat;
}
}
Output:
div {
background-color: #FFF;
}
.empty {
-webkit-border-radius: 10px;
border-radius: 20px;
background-color: #000;
font-size: 1em;
font-size: 2em;
}
body {
padding: 20px 0 0 10em;
background-color: #000;
background-repeat: no-repeat;
background-color: #0000011;
}
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
4.1.1- Tagged
- Feb 11, 2018
- Commit
965b55420309- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/da99/da_css.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 13, 2026
- Versions
- 11