Skip to content

Commit

Permalink
make use of :not and :is selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronpinero committed May 24, 2021
1 parent 7c62e9c commit 7029ee0
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 30 deletions.
2 changes: 1 addition & 1 deletion dist/style/tyfy.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/style/tyfy.css.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ <h2>v2.0.10 - 2021-05-24</h2>
<li>Added new Extras module for a custom <a href="audio.html"><span class="smallcaps">HTML</span> audio player</a></li>
<li>Moved some icons assets to <a href="https://github.com/aaronpinero/pinero-icons">a separate repository</a></li>
<li>Added styles for disabled button inputs</li>
<li>Updated <a href="compatibility.html">compatibility information</a></li>
</ul>
<h2>v2.0.9 - 2021-01-14</h2>
<ul>
Expand Down
2 changes: 2 additions & 0 deletions docs/compatibility.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ <h1>Browser Compatibility</h1>
<li><a href="https://caniuse.com/#feat=css-appearance"><span class="smallcaps">CSS</span> Appearance</a></li>
<li><a href="https://caniuse.com/#feat=css-sel3"><span class="smallcaps">CSS3</span> Selectors</a></li>
<li><a href="https://caniuse.com/#feat=css-variables"><span class="smallcaps">CSS</span> Custom Properties</a></li>
<li><a href="https://caniuse.com/css-not-sel-list"><span class="smallcaps">CSS</span> Select list argument of :not()</a></li>
<li><a href="https://caniuse.com/css-matches-pseudo"><span class="smallcaps">CSS</span> :is() pseudo-class</a></li>
<li><a href="https://www.caniuse.com/#feat=intersectionobserver">Intersection Observer API</a></li>
</ul>
</section>
Expand Down
1 change: 1 addition & 0 deletions docs/content/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ <h2>v2.0.10 - 2021-05-24</h2>
<li>Added new Extras module for a custom <a href="audio.html"><span class="smallcaps">HTML</span> audio player</a></li>
<li>Moved some icons assets to <a href="https://github.com/aaronpinero/pinero-icons">a separate repository</a></li>
<li>Added styles for disabled button inputs</li>
<li>Updated <a href="compatibility.html">compatibility information</a></li>
</ul>
<h2>v2.0.9 - 2021-01-14</h2>
<ul>
Expand Down
2 changes: 2 additions & 0 deletions docs/content/compatibility.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ <h1>Browser Compatibility</h1>
<li><a href="https://caniuse.com/#feat=css-appearance"><span class="smallcaps">CSS</span> Appearance</a></li>
<li><a href="https://caniuse.com/#feat=css-sel3"><span class="smallcaps">CSS3</span> Selectors</a></li>
<li><a href="https://caniuse.com/#feat=css-variables"><span class="smallcaps">CSS</span> Custom Properties</a></li>
<li><a href="https://caniuse.com/css-not-sel-list"><span class="smallcaps">CSS</span> Select list argument of :not()</a></li>
<li><a href="https://caniuse.com/css-matches-pseudo"><span class="smallcaps">CSS</span> :is() pseudo-class</a></li>
<li><a href="https://www.caniuse.com/#feat=intersectionobserver">Intersection Observer API</a></li>
</ul>
</section>
Expand Down
14 changes: 2 additions & 12 deletions docs/resources/style/tyfy-docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,7 @@ body dl * + *, body ol * + *, body ul * + * {
body dl * + dd {
margin-top: 0;
}
body :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) + h1,
body :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) + h2,
body :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) + h3,
body :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) + h4,
body :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) + h5,
body :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) + h6 {
body :not(h1, h2, h3, h4, h5, h6) + :is(h1,h2,h3,h4,h5,h6) {
margin-top: 2.625rem;
}

Expand All @@ -208,12 +203,7 @@ body :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) + h6 {
.tymargins-on dl * + dd {
margin-top: 0;
}
.tymargins-on :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) + h1,
.tymargins-on :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) + h2,
.tymargins-on :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) + h3,
.tymargins-on :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) + h4,
.tymargins-on :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) + h5,
.tymargins-on :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) + h6 {
.tymargins-on :not(h1, h2, h3, h4, h5, h6) + :is(h1,h2,h3,h4,h5,h6) {
margin-top: 2.625rem;
}

Expand Down
18 changes: 2 additions & 16 deletions source/scss/required/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,7 @@
// clears floats inside the element to which the mixin is applied

@mixin tyclear {
*zoom:1;
&::before,
&::after {
display:table;
content:"";
line-height:0;
}
&::after {
clear:both;
}
display: flow-root;
}

////////// tyhidden mixin //////////
Expand Down Expand Up @@ -66,12 +57,7 @@
@mixin tymargins-size ($context:all, $measure:tyspacing(md)) {
@if $context == headings {
// headings
:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) + h1,
:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) + h2,
:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) + h3,
:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) + h4,
:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) + h5,
:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) + h6 {
:not(h1,h2,h3,h4,h5,h6) + :is(h1,h2,h3,h4,h5,h6) {
margin-top:$measure;
}
}
Expand Down

0 comments on commit 7029ee0

Please sign in to comment.