Skip to content

Commit dbb5c63

Browse files
authored
Merge pull request #311 from rackerlabs/hx-icon-shadowdom
fix(HXIcon): correct issues with HXIconElement
2 parents ac6ac69 + b24e09f commit dbb5c63

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+242
-185
lines changed

docs/components/icons/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<section>
1111
<h2 id="basic-icon">Basic Icon</h2>
1212
<p>
13-
Add a styleable SVG icon with the <code>&lt;hx-icon&gt;</code> element.
13+
Use the <code>&lt;hx-icon&gt;</code> element to render a styleable inline SVG icon.
1414
</p>
1515
<div class="example">
1616
<div>

src/helix-ui/elements/HXAccordionPanelElement.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
@import "./HXElement";
2-
@import "elements/hx-icon";
32

43
#hxToggle {
54
background-color: transparent;

src/helix-ui/elements/HXAlertElement.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<div id="hxAlert">
2-
<hx-icon id="hxIcon" type="info-circle"></hx-icon>
2+
<span id="hxIconWrapper">
3+
<hx-icon id="hxIcon" type="info-circle"></hx-icon>
4+
</span>
35
<span id="hxContent">
46
<span id="hxStatus"></span>
57
<slot></slot>

src/helix-ui/elements/HXAlertElement.less

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
@import "./HXElement";
2-
@import "elements/hx-icon";
32

43
#hxAlert {
54
display: flex;
@@ -11,9 +10,9 @@
1110
cursor: pointer;
1211
}
1312

14-
#hxIcon {
13+
#hxIconWrapper {
1514
flex-shrink: 0;
16-
margin: 1rem;
15+
padding: 1rem;
1716
}
1817

1918
#hxContent {

src/helix-ui/elements/HXCheckboxElement.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
@import "./HXElement";
2-
@import "elements/hx-icon";
32

43
#hxCheckbox {
54
display: flex;
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<div id="hxError">
2-
<hx-icon type="exclamation-circle" id="hxIcon"></hx-icon>
3-
<slot></slot>
2+
<span>
3+
<hx-icon type="exclamation-circle" id="hxIcon"></hx-icon>
4+
</span>
5+
<span>
6+
<slot></slot>
7+
</span>
48
</div>
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
@import './HXElement';
2-
@import 'elements/hx-icon';
32

43
#hxError {
5-
#hxIcon {
6-
margin-right: 0.25rem;
4+
display: inline-flex;
5+
6+
* + * {
7+
margin-left: 0.25rem;
78
}
89
}

src/helix-ui/elements/HXFileIconElement.less

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
@import './HXElement';
2-
@import 'elements/hx-icon';
32

43
#hxFileIcon {
54
position: relative;
@@ -8,20 +7,20 @@
87
font-size: 2.5rem;
98
height: 1em;
109
}
11-
10+
1211
#hxOverlay {
1312
line-height: 1;
1413
position: absolute;
1514
text-align: center;
1615
top: 0.5rem;
1716
width: 100%;
1817
}
19-
18+
2019
#hxIcon {
2120
font-size: 1rem;
2221
height: 1em;
2322
}
24-
23+
2524
#hxExt {
2625
font-size: 0.5rem;
2726
line-height: 1.5;

src/helix-ui/elements/HXFileInputElement.less

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
@import './HXElement';
2-
@import 'elements/hx-icon';
32
@import (reference) "components/buttons";
43

54
:host {
65
#hxContent {
7-
/*
8-
Needed to prevent focusing of native file inputs.
9-
Especially true for Microsoft browsers, because
6+
/*
7+
Needed to prevent focusing of native file inputs.
8+
Especially true for Microsoft browsers, because
109
Edge and IE have double tab stops.
1110
*/
1211
display: none;

src/helix-ui/elements/HXFileTileElement.less

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@import "./HXElement";
22
@import "base/links";
3-
@import "elements/hx-icon";
43
@import "elements/hx-progress";
54
@import "components/progress";
65
@import (reference) "components/buttons";
@@ -22,7 +21,6 @@
2221
width: 100%;
2322
}
2423

25-
2624
#hxRetry {
2725
#Button.basic();
2826
#Button.small();

0 commit comments

Comments
 (0)