Skip to content

Commit 596bf94

Browse files
committed
Merge branch 'issue-360/band-body-grid-gap' of github.com:patternfly/patternfly-elements into issue-360/band-body-grid-gap
2 parents 056057d + cf244b5 commit 596bf94

Some content is hidden

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

56 files changed

+485
-1877
lines changed

docs/assets/pfe-base-sass/variables/_colors.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ $pfe-global--disabled-state--BorderColor: $pfe-global--color--gray-mercur
160160
// Theme colors
161161
// ========================================================================
162162

163-
// I think these are misplaced. Should be in cp-theme instead.
163+
// @TODO I think these are misplaced. Should be in the theme instead
164164
// $pfe-global--primary-color: $pfe-global--color--red !default;
165165
// $pfe-global--secondary-color: $pf-color-black-600 !default;
166166
//

docs/assets/sass/_colors.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ $pfe-global--disabled-state--BorderColor: $pfe-global--color--gray-mercur
160160
// Theme colors
161161
// ========================================================================
162162

163-
// I think these are misplaced. Should be in cp-theme instead.
163+
// @TODO I think these are misplaced. Should be in the theme instead.
164164
// $pfe-global--primary-color: $pfe-global--color--red !default;
165165
// $pfe-global--secondary-color: $pf-color-black-600 !default;
166166
//

docs/content/theme/pfe-layouts.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ tags = [ "theme" ]
1212
<link rel="stylesheet" type="text/css" href="//overpass-30e2.kxcdn.com/overpass.css">
1313
<link rel="stylesheet" type="text/css" href="../pfe-layouts.css">
1414
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/themes/prism.min.css">
15-
<link rel="stylesheet" type="text/css" href="../../cp-themeset/cp-themeset.css">
1615

1716
<style>
1817

elements/pfe-accordion/demo/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<title>PFElements: pfe-accordion Demo</title>
66

77
<link rel="stylesheet" href="http://overpass-30e2.kxcdn.com/overpass.css" />
8-
<!-- <link rel="stylesheet" href="../../../themes/cp-theme/cp-theme.css" /> -->
98

109
<noscript>
1110
<link href="../../pfelement/pfelement-noscript.min.css" rel="stylesheet">

elements/pfe-autocomplete/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@
44

55
## Install
66
```
7-
npm install @patternfly/cp-theme
87
npm install @patternfly/pfe-autocomplete
98
```
109

11-
cp-theme is a package that contains css variables setting that is used for theming patternfly elements.
1210

1311
Once installed, import it to your application:
1412
```
15-
import '@patternfly/cp-theme.umd.js';
1613
import '@patternfly/pfe-autocomplete.umd.js';
1714
```
1815

elements/pfe-autocomplete/demo/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<script src="/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
1616
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.5/require.min.js"></script>
1717
<script>require([
18-
'../../../themes/cp-theme/cp-theme.umd.js',
1918
'../pfe-autocomplete.umd.js'
2019
])</script>
2120
</head>

elements/pfe-avatar/demo/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
<!-- })</script> -->
2222

2323
<script type="module" src="../pfe-avatar.js"></script>
24-
<script src="../../../themes/cp-theme/cp-theme.umd.js"></script>
2524

2625
<style type="text/css" media="screen">
2726
/* :root {

elements/pfe-avatar/demo/pfe-avatar.story.js

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

elements/pfe-band/src/pfe-band.scss

Lines changed: 32 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
$LOCAL: band;
44

5+
%flex-fallback {
6+
display: flex;
7+
flex-flow: column nowrap;
8+
align-items: flex-start;
9+
margin-bottom: #{pfe-local(gutter--vertical)};
10+
}
11+
12+
%grid-layout {
13+
display: grid;
14+
grid-row-gap: #{pfe-local(gutter--vertical)};
15+
grid-column-gap: #{pfe-local(gutter--horizontal)};
16+
margin-bottom: 0;
17+
}
18+
519
:host {
620
display: block;
721

@@ -55,9 +69,7 @@ $LOCAL: band;
5569

5670
// Wrapper sets padding and background visuals
5771
position: relative;
58-
display: flex;
59-
flex-direction: column;
60-
justify-items: flex-start;
72+
@extend %flex-fallback;
6173

6274
// Padding
6375
padding: calc(#{pfe-local(Padding--vertical)} / 2) #{pfe-local(Padding--horizontal)};
@@ -99,45 +111,6 @@ $LOCAL: band;
99111
--pfe-band--Padding: calc(#{pfe-local(Padding--vertical)} / 4) #{pfe-local(Padding--horizontal)};
100112
}
101113

102-
.pfe-band__header,
103-
.pfe-band__body,
104-
.pfe-band__aside,
105-
.pfe-band__footer {
106-
display: flex;
107-
flex-flow: column nowrap;
108-
align-items: flex-start;
109-
margin-bottom: #{pfe-local(gutter--vertical)};
110-
}
111-
112-
@supports (display: grid) {
113-
.pfe-band__header,
114-
.pfe-band__body,
115-
.pfe-band__aside,
116-
.pfe-band__footer {
117-
display: grid;
118-
grid-row-gap: var(--pfe-band--gutter--vertical);
119-
grid-column-gap: var(--pfe-band--gutter--horizontal);
120-
margin-bottom: 0;
121-
}
122-
.pfe-band__header {
123-
grid-area: header;
124-
grid-template-columns: var(--pfe-band__header--layout);
125-
}
126-
.pfe-band__footer {
127-
grid-area: footer;
128-
grid-template-columns: var(--pfe-band__footer--layout);
129-
}
130-
.pfe-band__aside {
131-
grid-area: aside;
132-
grid-template-columns: var(--pfe-band__aside--layout);
133-
}
134-
.pfe-band__body {
135-
grid-area: body;
136-
grid-template-columns: var(--pfe-band__body--layout);
137-
margin-bottom: 0;
138-
}
139-
}
140-
141114
.pfe-band {
142115
&__container {
143116
// Does not need to be wrapped in @supports because it updates variables
@@ -227,12 +200,11 @@ $LOCAL: band;
227200
position: relative;
228201
margin: 0 auto;
229202
width: #{pfe-local(Width)};
230-
203+
@extend %flex-fallback;
204+
231205
// Grid support styles
232206
@supports (display: grid) {
233-
display: grid;
234-
grid-row-gap: #{pfe-local(gutter--vertical)};
235-
grid-column-gap: #{pfe-local(gutter--horizontal)};
207+
@extend %grid-layout;
236208
grid-template-columns: #{pfe-local(layout)};
237209
grid-template-rows: max-content;
238210
grid-template-areas: var(--pfe-band--gridTemplateArea_mobile);
@@ -241,4 +213,18 @@ $LOCAL: band;
241213
}
242214
}
243215
}
216+
// For each section in the band layout
217+
@each $section in (header, body, aside, footer) {
218+
&__#{$section} { // i.e., pfe-band__header
219+
@extend %flex-fallback; // Add the flex fallback styles
220+
// Apply the standard grid
221+
@supports (display: grid) {
222+
@extend %grid-layout;
223+
// Apply the section as a named grid-area
224+
grid-area: #{$section};
225+
// Allow users to hook into the layout with custom columns
226+
grid-template-columns: var(--pfe-band__#{$section}--layout);
227+
}
228+
}
229+
}
244230
}

elements/pfe-card/demo/index.html

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,6 @@
44
<meta charset="utf-8">
55
<title>PFElements: pfe-card Demo</title>
66

7-
<!-- needed for CP-Theme -->
8-
<link rel="stylesheet" href="http://overpass-30e2.kxcdn.com/overpass.css" />
9-
<!--
10-
if support for IE11 IS NOT needed, just include the stylesheet
11-
than contains all of the variables for your themeset
12-
-->
13-
<!-- use cp-theme -->
14-
<!-- <link rel="stylesheet" href="../../../themes/cp-theme/cp-theme.css" /> -->
15-
167
<!-- uncomment the es5-adapter if you're using the umd version -->
178
<script src="/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"></script>
189
<script src="/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
@@ -24,7 +15,6 @@
2415
-->
2516
<script>
2617
require([
27-
'../../../themes/cp-theme/cp-theme.umd.js',
2818
'../../pfe-cta/pfe-cta.umd.js',
2919
'../pfe-card.umd.js'
3020
]);

0 commit comments

Comments
 (0)