Skip to content

Commit 7208373

Browse files
authored
Fix component generation (tachyons-css#66)
The component build now uses the latest PostCSS API. The postcss-select library was also improved so selectors with pseudo elements/classes are also returned. Note that this update introduced some performance hits I will have to address later.
1 parent 8b30489 commit 7208373

File tree

40 files changed

+1048
-730
lines changed

40 files changed

+1048
-730
lines changed

build.js

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
require('./src/components-build')()
2+
console.log('components build complete')
23
require('./src/table-of-styles-build')()
4+
console.log('table of styles build complete')
35
require('./src/table-of-properties-build')()
6+
console.log('table of properties build complete')
47
require('./src/home-build')()
8+
console.log('home build complete')

components/articles/large-title-text.html

-42
This file was deleted.

components/articles/large-title-text/index.html

+16-7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111
<style>
1212
.blue { color: #0074D9; }
1313
.bg-blue { background-color: #0074D9; }
14+
15+
.carbon-poweredby { width: 100%; font-size: 12px; float: left; }
16+
.carbon-wrap { float: left; width: 100%; box-sizing: border-box; }
17+
.carbon-img { float: left; width: 50%; box-sizing: border-box; }
18+
.carbon-text { float: left; width: 50%; padding-left: 16px; box-sizing: border-box; font-size: 12px; }
19+
20+
#carbonads a:link { text-decoration: none!important; color: #222!important; }
21+
1422
</style>
1523

1624
</head>
@@ -146,7 +154,7 @@ <h2 class="f5">CSS</h2>
146154
max-width: 30em;
147155
}
148156

149-
@media screen and (min-width: 48em) {
157+
@media screen and (min-width: 30em) {
150158
.pa5-ns {
151159
padding: 4rem;
152160
}
@@ -168,7 +176,7 @@ <h2 class="f5">CSS</h2>
168176
<h2 class="f5 mb3 mt4">CSS Stats for this Component</h2>
169177
<dl class="dib mr4 mt0">
170178
<dt class="db f6">Gzipped Size</dt>
171-
<dd class="ml0 b f3 f2-ns">268<small class="f6">B</small>
179+
<dd class="ml0 b f3 f2-ns">265<small class="f6">B</small>
172180
</dd>
173181
</dl>
174182
<dl class="dib mr4 mt0">
@@ -454,28 +462,29 @@ <h2 class="f5 mb2 ttc mid-gray">nav</h2>
454462
<iframe src="https://ghbtns.com/github-btn.html?user=tachyons-css&repo=tachyons&type=fork&count=true" frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
455463
</article>
456464
<div class="mt4">
457-
<a class="black-70 link dim b dib mr3 pv2" href="http://tachyons-slack-invite.herokuapp.com" title="Join our Slack Channel">
465+
<a class="ba b--black-20 bg-white black-70 link br2 dim b dib mr3 pv2 ph3" href="http://tachyons-slack-invite.herokuapp.com" title="Join our Slack Channel">
458466
Join our Slack Channel
459467
</a>
460-
<a class="black-70 link dim b dib mr3 pv2" href="https://github.com/tachyons-css/tachyons/issues" title="File a bug, request a feature, ask a question!">
468+
<a class="ba b--black-20 bg-white br2 black-70 link dim b dib pv2 ph3" href="https://github.com/tachyons-css/tachyons/issues" title="File a bug, request a feature, ask a question!">
461469
Open an Issue
462470
</a>
463-
<a class="black-70 link dim b dib mr3 pv2" href="https://github.com/tachyons-css" title="Tachyons-css on GitHub">
464-
GitHub
465-
</a>
466471
</div>
467472
<p class="measure copy lh-copy">
468473
Have a question? Need help? Feel free to open an issue on GitHub or ask a
469474
question in our slack channel. We're here to try and help make designing in
470475
the browser fun.
471476
</p>
477+
<div class="pt4 cf mw5">
478+
<script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=tachyonsio" id="_carbonads_js"></script>
479+
</div>
472480
<small class="f6 measure db lh-copy mt5">
473481
A tachyon /ˈtæki.ɒn/ or tachyonic particle is a hypothetical particle
474482
that always moves faster than light.
475483
The word comes from the Greek:
476484
<br> <br>
477485
ταχύς or tachys, meaning "swift, quick, fast, rapid"
478486
</small>
487+
479488
</footer>
480489

481490
<script>

components/articles/left-title-top-border/index.html

+27-9
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111
<style>
1212
.blue { color: #0074D9; }
1313
.bg-blue { background-color: #0074D9; }
14+
15+
.carbon-poweredby { width: 100%; font-size: 12px; float: left; }
16+
.carbon-wrap { float: left; width: 100%; box-sizing: border-box; }
17+
.carbon-img { float: left; width: 50%; box-sizing: border-box; }
18+
.carbon-text { float: left; width: 50%; padding-left: 16px; box-sizing: border-box; font-size: 12px; }
19+
20+
#carbonads a:link { text-decoration: none!important; color: #222!important; }
21+
1422
</style>
1523

1624
</head>
@@ -111,6 +119,15 @@ <h2 class="f5">CSS</h2>
111119
border-width: .25rem;
112120
}
113121

122+
.cf:before, .cf:after {
123+
content: " ";
124+
display: table;
125+
}
126+
127+
.cf:after {
128+
clear: both;
129+
}
130+
114131
.cf {
115132
*zoom: 1;
116133
}
@@ -189,7 +206,7 @@ <h2 class="f5">CSS</h2>
189206
max-width: 30em;
190207
}
191208

192-
@media screen and (min-width: 48em) {
209+
@media screen and (min-width: 30em) {
193210
.fl-ns {
194211
float: left;
195212
display: inline;
@@ -221,16 +238,16 @@ <h2 class="f5">CSS</h2>
221238
<h2 class="f5 mb3 mt4">CSS Stats for this Component</h2>
222239
<dl class="dib mr4 mt0">
223240
<dt class="db f6">Gzipped Size</dt>
224-
<dd class="ml0 b f3 f2-ns">426<small class="f6">B</small>
241+
<dd class="ml0 b f3 f2-ns">465<small class="f6">B</small>
225242
</dd>
226243
</dl>
227244
<dl class="dib mr4 mt0">
228245
<dt class="db f6">Selectors</dt>
229-
<dd class="ml0 b f3 f2-ns">26</dd>
246+
<dd class="ml0 b f3 f2-ns">29</dd>
230247
</dl>
231248
<dl class="dib mt0">
232249
<dt class="db f6">Declarations</dt>
233-
<dd class="ml0 b f3 f2-ns">31</dd>
250+
<dd class="ml0 b f3 f2-ns">34</dd>
234251
</dl>
235252
</div>
236253
<div class="fl w-100">
@@ -519,28 +536,29 @@ <h2 class="f5 mb2 ttc mid-gray">nav</h2>
519536
<iframe src="https://ghbtns.com/github-btn.html?user=tachyons-css&repo=tachyons&type=fork&count=true" frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
520537
</article>
521538
<div class="mt4">
522-
<a class="black-70 link dim b dib mr3 pv2" href="http://tachyons-slack-invite.herokuapp.com" title="Join our Slack Channel">
539+
<a class="ba b--black-20 bg-white black-70 link br2 dim b dib mr3 pv2 ph3" href="http://tachyons-slack-invite.herokuapp.com" title="Join our Slack Channel">
523540
Join our Slack Channel
524541
</a>
525-
<a class="black-70 link dim b dib mr3 pv2" href="https://github.com/tachyons-css/tachyons/issues" title="File a bug, request a feature, ask a question!">
542+
<a class="ba b--black-20 bg-white br2 black-70 link dim b dib pv2 ph3" href="https://github.com/tachyons-css/tachyons/issues" title="File a bug, request a feature, ask a question!">
526543
Open an Issue
527544
</a>
528-
<a class="black-70 link dim b dib mr3 pv2" href="https://github.com/tachyons-css" title="Tachyons-css on GitHub">
529-
GitHub
530-
</a>
531545
</div>
532546
<p class="measure copy lh-copy">
533547
Have a question? Need help? Feel free to open an issue on GitHub or ask a
534548
question in our slack channel. We're here to try and help make designing in
535549
the browser fun.
536550
</p>
551+
<div class="pt4 cf mw5">
552+
<script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=tachyonsio" id="_carbonads_js"></script>
553+
</div>
537554
<small class="f6 measure db lh-copy mt5">
538555
A tachyon /ˈtæki.ɒn/ or tachyonic particle is a hypothetical particle
539556
that always moves faster than light.
540557
The word comes from the Greek:
541558
<br> <br>
542559
ταχύς or tachys, meaning "swift, quick, fast, rapid"
543560
</small>
561+
544562
</footer>
545563

546564
<script>

components/articles/left-title/index.html

+28-10
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111
<style>
1212
.blue { color: #0074D9; }
1313
.bg-blue { background-color: #0074D9; }
14+
15+
.carbon-poweredby { width: 100%; font-size: 12px; float: left; }
16+
.carbon-wrap { float: left; width: 100%; box-sizing: border-box; }
17+
.carbon-img { float: left; width: 50%; box-sizing: border-box; }
18+
.carbon-text { float: left; width: 50%; padding-left: 16px; box-sizing: border-box; font-size: 12px; }
19+
20+
#carbonads a:link { text-decoration: none!important; color: #222!important; }
21+
1422
</style>
1523

1624
</head>
@@ -84,7 +92,16 @@ <h2 class="f5">HTML</h2>
8492
</div>
8593
<div class="fl w-100 w-25-ns pl0 pl2-ns">
8694
<h2 class="f5">CSS</h2>
87-
<pre class="pa3 ba br2 b--black-05 h5" id="css">.cf {
95+
<pre class="pa3 ba br2 b--black-05 h5" id="css">.cf:before, .cf:after {
96+
content: " ";
97+
display: table;
98+
}
99+
100+
.cf:after {
101+
clear: both;
102+
}
103+
104+
.cf {
88105
*zoom: 1;
89106
}
90107

@@ -142,7 +159,7 @@ <h2 class="f5">CSS</h2>
142159
max-width: 30em;
143160
}
144161

145-
@media screen and (min-width: 48em) {
162+
@media screen and (min-width: 30em) {
146163
.fl-ns {
147164
float: left;
148165
display: inline;
@@ -174,16 +191,16 @@ <h2 class="f5">CSS</h2>
174191
<h2 class="f5 mb3 mt4">CSS Stats for this Component</h2>
175192
<dl class="dib mr4 mt0">
176193
<dt class="db f6">Gzipped Size</dt>
177-
<dd class="ml0 b f3 f2-ns">357<small class="f6">B</small>
194+
<dd class="ml0 b f3 f2-ns">393<small class="f6">B</small>
178195
</dd>
179196
</dl>
180197
<dl class="dib mr4 mt0">
181198
<dt class="db f6">Selectors</dt>
182-
<dd class="ml0 b f3 f2-ns">19</dd>
199+
<dd class="ml0 b f3 f2-ns">22</dd>
183200
</dl>
184201
<dl class="dib mt0">
185202
<dt class="db f6">Declarations</dt>
186-
<dd class="ml0 b f3 f2-ns">23</dd>
203+
<dd class="ml0 b f3 f2-ns">26</dd>
187204
</dl>
188205
</div>
189206
<div class="fl w-100">
@@ -466,28 +483,29 @@ <h2 class="f5 mb2 ttc mid-gray">nav</h2>
466483
<iframe src="https://ghbtns.com/github-btn.html?user=tachyons-css&repo=tachyons&type=fork&count=true" frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
467484
</article>
468485
<div class="mt4">
469-
<a class="black-70 link dim b dib mr3 pv2" href="http://tachyons-slack-invite.herokuapp.com" title="Join our Slack Channel">
486+
<a class="ba b--black-20 bg-white black-70 link br2 dim b dib mr3 pv2 ph3" href="http://tachyons-slack-invite.herokuapp.com" title="Join our Slack Channel">
470487
Join our Slack Channel
471488
</a>
472-
<a class="black-70 link dim b dib mr3 pv2" href="https://github.com/tachyons-css/tachyons/issues" title="File a bug, request a feature, ask a question!">
489+
<a class="ba b--black-20 bg-white br2 black-70 link dim b dib pv2 ph3" href="https://github.com/tachyons-css/tachyons/issues" title="File a bug, request a feature, ask a question!">
473490
Open an Issue
474491
</a>
475-
<a class="black-70 link dim b dib mr3 pv2" href="https://github.com/tachyons-css" title="Tachyons-css on GitHub">
476-
GitHub
477-
</a>
478492
</div>
479493
<p class="measure copy lh-copy">
480494
Have a question? Need help? Feel free to open an issue on GitHub or ask a
481495
question in our slack channel. We're here to try and help make designing in
482496
the browser fun.
483497
</p>
498+
<div class="pt4 cf mw5">
499+
<script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=tachyonsio" id="_carbonads_js"></script>
500+
</div>
484501
<small class="f6 measure db lh-copy mt5">
485502
A tachyon /ˈtæki.ɒn/ or tachyonic particle is a hypothetical particle
486503
that always moves faster than light.
487504
The word comes from the Greek:
488505
<br> <br>
489506
ταχύς or tachys, meaning "swift, quick, fast, rapid"
490507
</small>
508+
491509
</footer>
492510

493511
<script>

components/articles/title-text-image/index.html

+16-7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111
<style>
1212
.blue { color: #0074D9; }
1313
.bg-blue { background-color: #0074D9; }
14+
15+
.carbon-poweredby { width: 100%; font-size: 12px; float: left; }
16+
.carbon-wrap { float: left; width: 100%; box-sizing: border-box; }
17+
.carbon-img { float: left; width: 50%; box-sizing: border-box; }
18+
.carbon-text { float: left; width: 50%; padding-left: 16px; box-sizing: border-box; font-size: 12px; }
19+
20+
#carbonads a:link { text-decoration: none!important; color: #222!important; }
21+
1422
</style>
1523

1624
</head>
@@ -86,7 +94,7 @@ <h2 class="f5">CSS</h2>
8694
max-width: 30em;
8795
}
8896

89-
@media screen and (min-width: 48em) {
97+
@media screen and (min-width: 30em) {
9098
.pa5-ns {
9199
padding: 4rem;
92100
}
@@ -100,7 +108,7 @@ <h2 class="f5">CSS</h2>
100108
<h2 class="f5 mb3 mt4">CSS Stats for this Component</h2>
101109
<dl class="dib mr4 mt0">
102110
<dt class="db f6">Gzipped Size</dt>
103-
<dd class="ml0 b f3 f2-ns">177<small class="f6">B</small>
111+
<dd class="ml0 b f3 f2-ns">173<small class="f6">B</small>
104112
</dd>
105113
</dl>
106114
<dl class="dib mr4 mt0">
@@ -382,28 +390,29 @@ <h2 class="f5 mb2 ttc mid-gray">nav</h2>
382390
<iframe src="https://ghbtns.com/github-btn.html?user=tachyons-css&repo=tachyons&type=fork&count=true" frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
383391
</article>
384392
<div class="mt4">
385-
<a class="black-70 link dim b dib mr3 pv2" href="http://tachyons-slack-invite.herokuapp.com" title="Join our Slack Channel">
393+
<a class="ba b--black-20 bg-white black-70 link br2 dim b dib mr3 pv2 ph3" href="http://tachyons-slack-invite.herokuapp.com" title="Join our Slack Channel">
386394
Join our Slack Channel
387395
</a>
388-
<a class="black-70 link dim b dib mr3 pv2" href="https://github.com/tachyons-css/tachyons/issues" title="File a bug, request a feature, ask a question!">
396+
<a class="ba b--black-20 bg-white br2 black-70 link dim b dib pv2 ph3" href="https://github.com/tachyons-css/tachyons/issues" title="File a bug, request a feature, ask a question!">
389397
Open an Issue
390398
</a>
391-
<a class="black-70 link dim b dib mr3 pv2" href="https://github.com/tachyons-css" title="Tachyons-css on GitHub">
392-
GitHub
393-
</a>
394399
</div>
395400
<p class="measure copy lh-copy">
396401
Have a question? Need help? Feel free to open an issue on GitHub or ask a
397402
question in our slack channel. We're here to try and help make designing in
398403
the browser fun.
399404
</p>
405+
<div class="pt4 cf mw5">
406+
<script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=tachyonsio" id="_carbonads_js"></script>
407+
</div>
400408
<small class="f6 measure db lh-copy mt5">
401409
A tachyon /ˈtæki.ɒn/ or tachyonic particle is a hypothetical particle
402410
that always moves faster than light.
403411
The word comes from the Greek:
404412
<br> <br>
405413
ταχύς or tachys, meaning "swift, quick, fast, rapid"
406414
</small>
415+
407416
</footer>
408417

409418
<script>

0 commit comments

Comments
 (0)