Closed philschatz closed 6 years ago
Merging #4 into master will decrease coverage by
1.55%
. The diff coverage is84.51%
.
@@ Coverage Diff @@
## master #4 +/- ##
==========================================
- Coverage 88.24% 86.68% -1.56%
==========================================
Files 73 78 +5
Lines 1982 2186 +204
Branches 354 430 +76
==========================================
+ Hits 1749 1895 +146
- Misses 233 291 +58
Impacted Files | Coverage Δ | |
---|---|---|
src/helper/assert.js | 100% <ø> (+33.33%) |
:arrow_up: |
src/declarations.js | 97.46% <100%> (ø) |
:arrow_up: |
src/helper/rule-with-pseudos.js | 89.28% <100%> (ø) |
:arrow_up: |
test/unit/vanilla.css | 100% <100%> (ø) |
|
test/unit/sandbox.in.xhtml | 100% <100%> (ø) |
|
test/unit/display-none.css | 100% <100%> (ø) |
:arrow_up: |
test/unit/sandbox.less | 100% <100%> (ø) |
|
src/helper/pseudo-element.js | 98.11% <100%> (ø) |
:arrow_up: |
test/unit/vanilla.in.xhtml | 100% <100%> (ø) |
|
src/functions.js | 94.44% <100%> (+1.11%) |
:arrow_up: |
... and 48 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 8ac372c...2e32acb. Read the comment docs.
The main idea I'm trying to show is that we can now bake and style the book's Raw HTML file using css-plus
(aka CSS Transforms). The CSS file can now contain both the transforms and styling in the same file. This is useful because now you do not have to manually keep the recipe and styling file in sync. For example, here is what styling one of the features could look like:
// Pseudocode. Some styling omitted for brevity
.astronomy-basics {
// Add the purple header to the feature
&::before { // transform
tag-name-set: 'div'; // transform
content: 'Astronomy Basics'; // transform
color: white; // styling
background-color: #3C2747; // styling
// Add the feature image
&::after { // transform
content: url(images/astronomy-basics.svg); // styling
}
}
}
Lorem Ipsum...
This screencap shows the conversion of the entire astronomy book (1min). It shows the following (click it for a larger version):
<style>
tag (no need to pass an additional CSS file to prince
)
<style>
tag
This outputs an additional CSS file when the original CSS file contains "vanilla" CSS. For example the following input file will result in an additional CSS file:
Input HTML
Input CSS
Output HTML
TODO
a:hover { ... }
)::before { content: url(...); }
by not processing it (maybe?)collapse autogenerated class names together into 1 so each element has at most 1 autogenerated classprefer non-autogenerated class names if possible