Skip to content

Commit 51bee47

Browse files
castastropheheyMPcastastrophe
authored
fix: issue with custom styles piercing shadow DOM rendering (#1365)
* fix: Fixing issue with custom styles piercing shadow DOM rendering * fix: Move the creation of the new elements into the hasLightDOM check * fix: Force hide anything that isn't the accordion or tab in the light DOM * fix: Update AT and resolve changes based on code review feedback * fix: Remove old tests because backwards compatible attributes are supported in main testing * fix: Patch edge case Kendall found Co-authored-by: Michael Potter <[email protected]> Co-authored-by: castastrophe <[email protected]>
1 parent 403e9ff commit 51bee47

File tree

17 files changed

+496
-1561
lines changed

17 files changed

+496
-1561
lines changed

CHANGELOG-1.x.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
# 1.3.0 (2021-02-16)
1+
# 1.3.0 (2021-02-17)
22

3-
- [](https://github.com/patternfly/patternfly-elements/commit/) feat: adding a $custom-prop-prefix variable to relieve naming conflict risk ($repo is too generic).
3+
### Features
4+
- [e7c0f3a](https://github.com/patternfly/patternfly-elements/commit/e7c0f3a45648f26c87bc3447f7c6a47c8c00c1a0) feat: adding a $custom-prop-prefix variable to relieve naming conflict risk ($repo is too generic).
5+
6+
### Fixes
7+
- [](https://github.com/patternfly/patternfly-elements/commit/) fix: pfe-content-set requires light DOM styles in panels
48

59
## 1.2.0 ( 2021-02-12 )
610

elements/pfe-content-set/demo/demo.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,10 @@ section h3 {
6060
margin-right: 2%;
6161
border: #eee solid 1px;
6262
padding: 20px;
63+
}
64+
65+
.custom-styles {
66+
font-family: "Comic Sans MS", "Comic Sans", cursive;
67+
font-weight: bolder;
68+
color: orangered;
6369
}

elements/pfe-content-set/demo/index.html

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,12 @@ <h4 pfe-content-set--header>Heading 1</h4>
9595
varius blandit sit amet non magna. Etiam porta sem malesuada magna mollis euismod.</p>
9696
</div>
9797
<h4 pfe-content-set--header>Heading 2</h4>
98-
<div pfe-content-set--panel>Content for heading 2. Sed posuere consectetur est at lobortis. Donec id elit non mi
98+
<div pfe-content-set--panel>
99+
<p>Content for heading 2. Sed posuere consectetur est at lobortis. Donec id elit non mi
99100
porta gravida at eget metus. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Maecenas faucibus
100-
mollis interdum.</div>
101+
mollis interdum.</p>
102+
<p class="custom-styles">Custom styles to validate that they still work!</p>
103+
</div>
101104
<h4 pfe-content-set--header>Heading 3</h4>
102105
<div pfe-content-set--panel>Content for heading 3. Donec ullamcorper nulla non metus auctor fringilla. Donec
103106
ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Aenean eu leo
@@ -274,9 +277,9 @@ <h4 pfe-content-set--header>Heading 1</h4>
274277
<p>Content for heading 1. Maecenas faucibus mollis interdum. Maecenas sed diam eget risus varius blandit sit
275278
amet non magna. Maecenas sed diam eget risus varius blandit sit amet non magna. Maecenas sed diam eget risus
276279
varius blandit sit amet non magna. Etiam porta sem malesuada magna mollis euismod.</p>
277-
<div class="cta">
280+
<pfe-cta>
278281
<a href="https://redhat.com">Primary CTA</a>
279-
</div>
282+
</pfe-cta>
280283
</div>
281284
<h4 pfe-content-set--header>Heading 2</h4>
282285
<div pfe-content-set--panel>Content for heading 2. Sed posuere consectetur est at lobortis. Donec id elit non mi
@@ -532,11 +535,11 @@ <h2>Content 2</h2>
532535

533536
var header = document.createElement("h4");
534537
header.setAttribute("pfe-content-set--header", true);
535-
header.textContent = "New Heading";
538+
header.textContent = "New heading";
536539

537540
var panel = document.createElement("div");
538541
panel.setAttribute("pfe-content-set--panel", true);
539-
panel.textContent = "New Panel";
542+
panel.textContent = "New panel";
540543

541544
fragment.appendChild(header);
542545
fragment.appendChild(panel);

elements/pfe-content-set/package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,21 @@
4747
{
4848
"name": "Kendall Totten"
4949
},
50+
{
51+
"name": "castastrophe",
52+
"url": "https://www.github.com/castastrophe"
53+
},
5054
{
5155
"name": "Kyle Buchanan",
5256
"email": "[email protected]",
5357
"url": "https://github.com/kylebuch8"
5458
}
5559
],
5660
"license": "MIT",
61+
"devDependencies": {
62+
"@patternfly/pfe-cta": "^1.2.0",
63+
"@patternfly/pfe-styles": "^1.2.0"
64+
},
5765
"dependencies": {
5866
"@patternfly/pfe-accordion": "^1.2.0",
5967
"@patternfly/pfe-tabs": "^1.2.0",
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
<div id="lightdom" hidden>
2-
<slot></slot>
3-
</div>
4-
<pfe-tabs hidden visible-at="large"></pfe-tabs>
5-
<pfe-accordion hidden visible-at="small"></pfe-accordion>
1+
<slot id="lightdom" hidden></slot>
2+
<slot name="_view" private></slot>

0 commit comments

Comments
 (0)