Skip to content

Commit 067879a

Browse files
author
Ryan A. Johnson
committed
fix(slot): correct broken style inheritance
1 parent 4c5d819 commit 067879a

File tree

10 files changed

+50
-20
lines changed

10 files changed

+50
-20
lines changed

source/_less/reset.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ html {
2121
box-sizing: inherit;
2222
}
2323

24+
[hidden] {
25+
display: none;
26+
}
27+
2428
a {
2529
background-color: transparent;
2630
}

source/components/HxElement.less

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@import (reference) "vars";
2+
3+
* {
4+
box-sizing: border-box;
5+
6+
// Text styles need passed through
7+
color: inherit;
8+
font-family: inherit;
9+
font-size: inherit;
10+
letter-spacing: inherit;
11+
line-height: inherit;
12+
}

source/components/checkbox/HxCheckbox.less

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import 'vars';
1+
@import "../HxElement";
22

33
:host {
44
background-color: @gray-0;
@@ -12,10 +12,6 @@
1212
vertical-align: middle;
1313
width: 1rem;
1414

15-
&([hidden]) {
16-
display: none;
17-
}
18-
1915
/* default unchecked */
2016
&(:hover) {
2117
background-color: @cyan-50;
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<button id="toggle" aria-expanded="false">
22
<slot name="summary"></slot>
33
</button>
4-
<div id="content">
5-
<slot></slot>
6-
</div>
4+
<slot id="content"></slot>

source/components/reveal/HxReveal.less

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
@import "../HxElement";
2+
13
:host {
24
display: block;
35

4-
&([open]) > #content {
5-
display: block;
6+
&([open]) #content {
7+
display: contents;
68
}
79
}
810

@@ -13,8 +15,6 @@
1315
#toggle {
1416
background-color: transparent;
1517
border: none;
16-
color: inherit;
17-
font-size: 1em;
1818
margin: 0;
1919
padding: 0;
2020
text-align: left;

source/components/tabset/HxTabpanel.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@import (reference) 'vars';
21
@import '../reveal/HxReveal.less';
32

43
:host {

source/components/tabset/HxTabset.less

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@import "../HxElement";
2+
13
:host {
24
background-color: inherit;
35
display: block;

source/components/tabset/index.html

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,23 @@ <h2 class="hxSectionTitle" id="tabset">Tabset</h2>
1818
<a href="#" role="tab" class="hxTab">Caramels Marzipan</a>
1919
</div>
2020
<hx-tabpanel id="cupcake">
21-
<p>
22-
Cupcake ipsum dolor sit amet pie. Tiramisu icing cake. Macaroon halvah apple pie. Carrot cake cheesecake chocolate bar toffee biscuit candy gummi bears. Apple pie chocolate cake dessert liquorice biscuit cupcake. Jelly sugar plum chocolate bar chocolate. Wafer fruitcake carrot cake jelly jujubes cookie danish. Sesame snaps gingerbread gingerbread pastry gummies jelly beans icing. Sesame snaps wafer lollipop. Cookie gummies icing marshmallow powder soufflé topping tart.
23-
</p>
21+
<div class="hxRow">
22+
<div class="hxCol-6">
23+
<p>
24+
Cupcake ipsum dolor sit amet bonbon topping caramels. Sesame snaps
25+
gummi bears liquorice cookie chupa chups fruitcake croissant
26+
chocolate topping. Brownie biscuit wafer marshmallow liquorice
27+
soufflé powder jelly.
28+
</p>
29+
</div>
30+
<div class="hxCol-6">
31+
<p>
32+
Sweet roll sesame snaps danish I love jelly wafer dragée soufflé
33+
cake. Cookie chocolate cake gingerbread powder icing. Ice cream
34+
cotton candy gummi bears oat cake sweet pastry.
35+
</p>
36+
</div>
37+
</div>
2438
</hx-tabpanel>
2539
<hx-tabpanel id="biscuit">
2640
<p>
@@ -41,7 +55,12 @@ <h2 class="hxSectionTitle" id="tabset">Tabset</h2>
4155
<a href="#" role="tab" class="hxTab">Biscuit Marshmallow</a>
4256
<a href="#" role="tab" class="hxTab">Caramel Marzipan</a>
4357
</div>
44-
<hx-tabpanel id="cupcake">...</hx-tabpanel>
58+
<hx-tabpanel id="cupcake">
59+
<div class="hxRow">
60+
<div class="hxCol-6">...</div>
61+
<div class="hxCol-6">...</div>
62+
</div>
63+
</hx-tabpanel>
4564
<hx-tabpanel id="biscuit">...</hx-tabpanel>
4665
<hx-tabpanel id="caramel">...</hx-tabpanel>
4766
</hx-tabset>

source/docs.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
-------------------------
1313
For distributed HelixUI CSS styles, see source/styles/helix-ui.less
1414
*/
15-
@import 'vars';
15+
@import (reference) 'vars';
1616

1717
body {
1818
background-color: @gray-25;

source/helix-ui.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
@import 'imports';
55

66
// LESS Vars and Mixins
7-
@import (less, reference) 'vars';
8-
@import (less, reference) 'mixins';
7+
@import (reference) 'vars';
8+
@import (reference) 'mixins';
99

1010
// Normalization and Resets
1111
@import 'reset';

0 commit comments

Comments
 (0)