Skip to content

Commit 1cbbe9d

Browse files
committed
using group.children instead of the query selector
Unfortunately, there isn't a querySelectorAll that works for getting the immediate children of an element. :scope would work but it has limited support and I dont want to add a polyfill. Using .children and then filtering out the things that don't have a pfe-heading attribute should do the trick. Fixes #314
1 parent 0530d02 commit 1cbbe9d

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
'../../../themes/cp-theme/cp-theme.umd.js',
1616
'../pfe-content-set.umd.js',
1717
'../../pfe-tabs/pfe-tabs.umd.js',
18-
'../../pfe-accordion/pfe-accordion.umd.js'
18+
'../../pfe-accordion/pfe-accordion.umd.js',
19+
'../../pfe-cta/pfe-cta.umd.js'
1920
]);
2021
</script>
2122
<noscript>
@@ -36,6 +37,7 @@ <h3>Container max: 500px</h3>
3637
<pfe-content-set-group>
3738
<h2 pfe-heading>Heading 1</h2>
3839
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore </p>
40+
<pfe-cta priority="primary" color="base" on="dark"><a href="#">Primary</a></pfe-cta>
3941
</pfe-content-set-group>
4042
<pfe-content-set-group>
4143
<h2 pfe-heading>Heading 2</h2>
@@ -98,6 +100,7 @@ <h2>On desktop, example below should render as tabs (default style):</h2>
98100
<h2 pfe-heading>Heading 1 Foo</h2>
99101
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
100102
<p>Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua</p>
103+
<pfe-cta priority="primary" color="base" on="dark"><a href="#">Primary</a></pfe-cta>
101104
</pfe-content-set-group>
102105
<pfe-content-set-group>
103106
<h2 pfe-heading>Heading 2</h2>

elements/pfe-content-set/pfe-content-set.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

elements/pfe-content-set/pfe-content-set.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)