Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
fc7ebe0
[dev]: Updating the component with a few new variable hooks
Oct 28, 2019
37236aa
feat Adjusting template for overflow region, add styles
Nov 18, 2019
5e278a0
feat - update borderweight to borderwidth for consistency
Nov 18, 2019
ee0638b
feat revert demo file listing
Nov 18, 2019
0cc3213
feat Adding fallback to hide overlay on print, revert changes to list…
Nov 19, 2019
6c7cfcf
Merge branch 'master' of https://github.com/patternfly/patternfly-ele…
Nov 19, 2019
fa800c6
feat Add !important to margin settings to overcome standard browser s…
Nov 19, 2019
285be5a
Merge branch 'master' into feat-add-card-variables
castastrophe Dec 2, 2019
8a31d32
Update elements/pfe-card/README.md
castastrophe Dec 2, 2019
73aa137
Update elements/pfe-card/demo/index.html
castastrophe Dec 2, 2019
72f8871
Update index.html
castastrophe Dec 2, 2019
bce6e2f
Merge branch 'master' into feat-add-card-variables
castastrophe Dec 20, 2019
7f8e7a6
Merge branch 'master' into feat-add-card-variables
castastrophe Jan 1, 2020
fcda025
Merge branch 'master' into feat-add-card-variables
castastrophe Jan 6, 2020
5df7982
Add a default border color and with when
eyevana Jan 7, 2020
ccbdcc6
Update demo file with an example of a default
eyevana Jan 7, 2020
7a5aac7
Update README and schema for storybook
eyevana Jan 7, 2020
2fc1bd8
Merge branch 'master' into feat-add-card-variables
castastrophe Jan 14, 2020
0ba130f
Merge branch 'master' into feat-add-card-variables
castastrophe Jan 14, 2020
aa5809e
Merge branch 'master' into feat-add-card-variables
castastrophe Jan 20, 2020
0cd36a5
Merge branch 'master' into feat-add-card-variables
castastrophe Jan 29, 2020
fa66306
feat Update pfelement 404
Jan 29, 2020
c70a332
Merge branch 'master' of https://github.com/patternfly/patternfly-ele…
Jan 29, 2020
674e213
Merge branch 'master' into feat-add-card-variables
castastrophe Feb 7, 2020
f7868f1
feat Create an overlay extend and use that in pfe-card
Feb 7, 2020
a2a375a
Merge branch 'master' into feat-add-card-variables
castastrophe Feb 7, 2020
bfc6255
Merge branch 'master' of https://github.com/patternfly/patternfly-ele…
Feb 14, 2020
c8ffdeb
feat Revert spandx update
Feb 14, 2020
01c3bd6
feat Add test case for pfe-border, update with new css vars
Feb 17, 2020
21d234f
feat Revert spandx update
Feb 17, 2020
038e3a2
Merge branch 'master' into feat-add-card-variables
castastrophe Feb 19, 2020
b6f196c
feat Create a clear-spacing mixin
Feb 24, 2020
f2652a2
feat Update demo with review feedback
Feb 24, 2020
bdfb917
feat Fix alignment issue in demo for FF
Feb 24, 2020
6d5a736
feat Play with demo fallbacks and image sizes; nice-to-haves
Feb 24, 2020
670c16d
feat Adjust the grid layout on the demo page for pfe-card
Feb 24, 2020
262a487
feat Pull out unrelated prettier updates
Feb 24, 2020
d52c59e
Merge branch 'master' into feat-add-card-variables
castastrophe Mar 3, 2020
d0c7417
Merge branch 'master' into feat-add-card-variables
castastrophe Mar 6, 2020
3166961
Merge branch 'master' into feat-add-card-variables
castastrophe Mar 10, 2020
a9853a6
Merge branch 'master' into feat-add-card-variables
castastrophe Mar 16, 2020
9c448d9
Merge branch 'master' of https://github.com/patternfly/patternfly-ele…
Apr 8, 2020
2bde911
feat Update documentation, ensure hooks are empty initially
Apr 8, 2020
119fcaa
feat Fix test
Apr 8, 2020
32229f1
feat Update demo page to show how to test variables globally set; rem…
Apr 9, 2020
5754439
feat Add additional hooks, update test suite
Apr 13, 2020
8a3c07d
feat Apply Kendall's idea for creating map and using pfe-local to pop…
Apr 13, 2020
8086938
feat Move demo styles into separate file; add more custom examples on…
Apr 15, 2020
b8dd05e
feat Additional code review updates
Apr 15, 2020
9e9c38f
Merge branch 'master' of https://github.com/patternfly/patternfly-ele…
Apr 15, 2020
b96be3c
feat Fix typo and adjust how margin/padding is applied
Apr 16, 2020
8e96c84
feat Add logic for targeting the last item inside a slot
Apr 16, 2020
9b60c09
feat Remove console
Apr 16, 2020
dd1bcd2
feat Add a display hook for the host
Apr 16, 2020
94cfc77
feat Fixing AT, making style and JS adjustments to support those fixes
Apr 20, 2020
d919444
feat Update documentation, code examples based on feedback
Apr 20, 2020
d17546f
feat Updates based on code review feedback
Apr 20, 2020
5e91ed1
Merge branch 'master' into feat-add-card-variables
castastrophe Apr 27, 2020
efb724f
Allow for hiding regions using the hidden attribute
Apr 27, 2020
0b73c3d
Merge branch 'feat-add-card-variables' of https://github.com/patternf…
Apr 27, 2020
78ff5c2
Merge branch 'master' into feat-add-card-variables
castastrophe Apr 29, 2020
edefb9e
feat Update styles based on review
Apr 29, 2020
de1d874
feat Update test
Apr 29, 2020
bfb6057
feat Pull out auto-changelog updates
May 1, 2020
bd26bab
Merge branch 'master' of github.com:patternfly/patternfly-elements in…
May 7, 2020
54b3f0c
Merge branch 'master' of https://github.com/patternfly/patternfly-ele…
May 18, 2020
f51109f
feat Fix issues with the storybook rendering
May 18, 2020
ffa5f38
Merge branch 'master' into feat-add-card-variables
castastrophe Jul 22, 2020
c7f0b5a
Merge branch 'master' of github.com:patternfly/patternfly-elements in…
Jan 7, 2021
bd6016e
Branch was auto-updated with the latest.
github-actions[bot] Jan 7, 2021
6bf8899
Branch was auto-updated with the latest.
github-actions[bot] Jan 7, 2021
243197f
Branch was auto-updated with the latest.
github-actions[bot] Jan 7, 2021
6018ffd
Merge branch 'master' of github.com:patternfly/patternfly-elements in…
Jan 24, 2021
58e08b2
feat: Remove pre-1.0 changes
Jan 24, 2021
2da6c78
feat: Resolve a few sass deprecations
Jan 24, 2021
8b24542
Branch was auto-updated with the latest.
github-actions[bot] Jan 25, 2021
3d2c746
Branch was auto-updated with the latest.
github-actions[bot] Jan 25, 2021
6a279b1
Branch was auto-updated with the latest.
github-actions[bot] Jan 25, 2021
48215d5
Merge branch 'master' into feat-add-card-variables
castastrophe Jan 25, 2021
2a87fe1
feat: Pull out console messages
Jan 25, 2021
f120a37
Merge branch 'feat-add-card-variables' of github.com:patternfly/patte…
Jan 25, 2021
9f3e1f5
feat: Update comments that have @TODO
Jan 25, 2021
a4a0995
feat: Update documentation
Jan 25, 2021
7ebf345
feat: Add empty height/width to prevent giant SVGs
Jan 25, 2021
5b89ba0
feat: Update documentation; add border from band when colors match
Jan 25, 2021
fff877e
feat: Update baseline, clean up demo page
Jan 25, 2021
1abdc29
feat: Remove test-fixtures for framework validation
Jan 25, 2021
7fb1c86
Merge branch 'master' into feat-add-card-variables
castastrophe Jan 25, 2021
04c7e74
feat: Update docs
Jan 25, 2021
3207ba8
Merge branch 'feat-add-card-variables' of github.com:patternfly/patte…
Jan 25, 2021
aaaaff7
Branch was auto-updated with the latest.
github-actions[bot] Jan 25, 2021
0d2716c
feat: Update docs
Jan 25, 2021
5d2e252
Merge branch 'feat-add-card-variables' of github.com:patternfly/patte…
Jan 25, 2021
073045d
Branch was auto-updated with the latest.
github-actions[bot] Jan 25, 2021
7453c4a
Merge branch 'feat-add-card-variables' of [email protected]:patternfly/p…
Feb 11, 2021
2f5513b
Apply suggestions from code review
castastrophe Feb 11, 2021
e8caae9
Branch was auto-updated with the latest.
github-actions[bot] Feb 11, 2021
031fde1
Merge branch 'master' of github.com:patternfly/patternfly-elements in…
Mar 11, 2021
c9aed8c
feat: Update chrome baseline
Mar 12, 2021
bdd9625
feat: Add gap support to footer
Mar 12, 2021
b5092db
Merge branch 'master' into feat-add-card-variables
castastrophe Mar 15, 2021
4bdc7e6
Update elements/pfelement/src/pfelement.js
castastrophe Mar 15, 2021
900c56c
Branch was auto-updated with the latest.
github-actions[bot] Mar 15, 2021
0d2af99
Merge branch 'master' into feat-add-card-variables
castastrophe Mar 17, 2021
ee8e9e9
Merge branch 'master' into feat-add-card-variables
castastrophe Mar 17, 2021
57500a0
Update .storybook/utils.js
castastrophe Mar 17, 2021
007634e
Branch was auto-updated with the latest.
github-actions[bot] Mar 17, 2021
2d69f6a
Branch was auto-updated with the latest.
github-actions[bot] Mar 17, 2021
26460bb
Branch was auto-updated with the latest.
github-actions[bot] Mar 18, 2021
2f95a7f
Merge branch 'master' into feat-add-card-variables
castastrophe Mar 18, 2021
ac01eed
Merge branch 'master' of github.com:patternfly/patternfly-elements in…
Mar 30, 2021
e73f752
Merge branch 'master' of github.com:patternfly/patternfly-elements in…
castastrophe Apr 8, 2021
107db1a
feat: Remove band auto-border; move toBEM to mixin
castastrophe Apr 8, 2021
bd39b26
feat: Migrate utilities to a mixin approach for pfecard
castastrophe Apr 8, 2021
f5e3959
feat: Simplify import approach
castastrophe Apr 8, 2021
b8bee26
feat: Delay render until parsing is complete
castastrophe Apr 8, 2021
f76a513
feat: Pull back mixins approach
castastrophe Apr 8, 2021
671f614
feat: Debugging polyfills for IE11
castastrophe Apr 9, 2021
54c806b
Branch was auto-updated with the latest.
github-actions[bot] Apr 9, 2021
06f5fb8
Merge branch 'master' of github.com:patternfly/patternfly-elements in…
castastrophe Apr 20, 2021
3790446
Branch was auto-updated with the latest.
github-actions[bot] Apr 21, 2021
789d4c3
Merge branch 'master' into feat-add-card-variables
castastrophe May 6, 2021
fad55b8
Branch was auto-updated with the latest.
github-actions[bot] May 6, 2021
54dec29
Branch was auto-updated with the latest.
github-actions[bot] May 6, 2021
ff613a8
Merge branch 'master' of github.com:patternfly/patternfly-elements in…
castastrophe Jun 25, 2021
deb051b
feat: Update the way first/last and has_* is applied
castastrophe Jun 25, 2021
5d25f15
feat: Update pfe-card to use new test suite
castastrophe Jun 25, 2021
db6d03d
feat: Add a TODO note
castastrophe Jun 25, 2021
7f4af75
Merge branch 'master' into feat-add-card-variables
castastrophe Jun 25, 2021
c5827ed
feat: Update slotobserver to pick up region changes to hidden attribute
castastrophe Jun 25, 2021
0b39428
Merge branch 'feat-add-card-variables' of github.com:patternfly/patte…
castastrophe Jun 25, 2021
eedd620
feat: Remove slotObserver which was not working
castastrophe Jun 25, 2021
f36527c
feat: Move initialize slots out of for loop for mutation observer
castastrophe Jun 25, 2021
35489d7
Branch was auto-updated with the latest.
github-actions[bot] Jun 28, 2021
52d1b73
Branch was auto-updated with the latest.
github-actions[bot] Jun 28, 2021
fcc8ea8
Merge branch 'master' into feat-add-card-variables
castastrophe Jul 12, 2021
716ba1f
Merge branch 'master' into feat-add-card-variables
castastrophe Jul 28, 2021
734fbdf
Branch was auto-updated with the latest.
github-actions[bot] Jul 28, 2021
fefe635
Branch was auto-updated with the latest.
github-actions[bot] Jul 28, 2021
18eefad
Branch was auto-updated with the latest.
github-actions[bot] Jul 28, 2021
a3cc28d
Merge branch 'master' of github.com:patternfly/patternfly-elements in…
castastrophe Jul 28, 2021
4f4042a
feat: Move pfelement updates into pfe-card for now
castastrophe Jul 28, 2021
5cd2c2d
feat: Add back the slot observer
castastrophe Jul 28, 2021
7117312
feat: Fix bug in pfelement; update tests
castastrophe Jul 28, 2021
2f23d85
feat: Comment back in card test cases
castastrophe Jul 28, 2021
e44c3c7
feat: Update baseline images
castastrophe Jul 28, 2021
2ea1c04
Merge branch 'master' into feat-add-card-variables
castastrophe Jul 29, 2021
2362f95
Update elements/pfe-band/README.md
castastrophe Jul 29, 2021
1d373c9
feat: Update baseline image, run todos
castastrophe Jul 29, 2021
4e79b72
Merge branch 'feat-add-card-variables' of github.com:patternfly/patte…
castastrophe Jul 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG-1.x.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 1.11.0 (2021)

- [](https://github.com/patternfly/patternfly-elements/commit/) feat: Adding variable hooks for pfe-card, overlay region
- [d3ea7fa](https://github.com/patternfly/patternfly-elements/commit/d3ea7facb0c36b7f3e20e2568bdc4bf2e5a5a852) feat: Graceful failure for component registry
- [](https://github.com/patternfly/patternfly-elements/commit/) fix: Accordion alignment with latest design kit
- [5f88c39](https://github.com/patternfly/patternfly-elements/commit/5f88c3963f8a6c13a9aeba6e9f664678453d46ce) fix: Jump links parseInt for IE11
Expand All @@ -15,7 +16,6 @@
- [c9c3b56](https://github.com/patternfly/patternfly-elements/commit/c9c3b5654ac05875eabfce0727c54af183e4ac09) chore: Minor testing updates
- [af4bc70](https://github.com/patternfly/patternfly-elements/commit/af4bc7063b995c316320f6df706b744133f1753d) feat: Jump links navigation rework to support panel customizations and elements in separate DOMs; horizontal designs aligned to kit


# 1.9.3 (2021-06-16)

- [b7fc80d](https://github.com/patternfly/patternfly-elements/commit/b7fc80d3417eb14be519c6e37895fcff639d1bbd) fix: set margin-top for ctas in footer on mobile
Expand Down
2 changes: 2 additions & 0 deletions brand/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ pfe-card .img-link {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
}

pfe-card h2 {
Expand Down
2 changes: 1 addition & 1 deletion docs/_data/todos.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion elements/pfe-band/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ The aside settings have defaults and if no attribute is defined on the element's
There are several powerful variables available to hook into and override default styles.

- **Vertical and horizontal padding**: `--pfe-band--Padding--vertical` and `--pfe-band--Padding--horizontal` accept size values such as px, em, rem, etc.
- **Background color**: Though using the `pfe-color` attribute is strongly recommended when setting the background color for the band, you can also use completely custom colors by updating the `--pfe-band--BackgroundColor` variable. If you update this value manually, you should also update the `--context` context variable to invoke the right context on it and it's child elements. Supported contexts include: `light`, `dark`, and `saturated`.
- **Background color**: Though using the `color` attribute is strongly recommended when setting the background color for the band, you can also use completely custom colors by updating the `--pfe-band--BackgroundColor` variable. If you update this value manually, you should also update the `--context` context variable to invoke the right context on it and it's child elements. Supported contexts include: `light`, `dark`, and `saturated`.
- **Background position**: This is designed for use with the `pfe-img-src` attribute to allow you to align your background image. Default value is `center center`.
- **Border**: This allows the customization of a border around the entire container and is primarily designed to be used to add a top and/or bottom border line. This variable accepts the entire border shorthand and is set to transparent by default.
- **Layout**: The band has a rudimentary layout system designed to be used inside the slot regions for the header, body, footer, and aside (see `use-grid` attribute details above). The regions themselves are also wrapped in a grid system that supports customization. All layouts appears "stacked" by default. Please note that the fallback for older browsers is a simple stacked layout (the aside position will be aligned using floats). Possible values include: `1fr 1fr`, `repeat(3, 1fr)`, `repeat(auto-fill, minmax(300px, 1fr))`. i.e., `--pfe-band--layout: repeat(auto-fill, minmax(300px, 1fr));`.
Expand Down
2 changes: 2 additions & 0 deletions elements/pfe-band/src/pfe-band.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ class PfeBand extends PFElement {

// Update the background image
_imgSrcChanged(oldVal, newVal) {
if (oldVal === newVal) return;

// Set the image as the background image
this.style.backgroundImage = newVal ? `url('${newVal}')` : ``;
}
Expand Down
73 changes: 65 additions & 8 deletions elements/pfe-card/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
```

## Slots
All slots are optional. If the slot is not defined, the content will be added to the `body` region of the card.
All slots are optional. If the slot is not defined, the content will be added to the `body` region of the card.

### Header
If this slot is used, we expect a heading level tag (h1, h2, h3, h4, h5, h6). An icon, svg, or use of the icon component are also valid in this region.
If this slot is used, we expect a heading level tag (h1, h2, h3, h4, h5, h6). An icon, svg, or use of the icon component are also valid in this region.

### Default slot (body)
Any content that is not designated for the `header` or `footer` slot, will go to this slot.

### Footer
Use this slot for anything that you want to be stuck to the base of the card. This region is bottom-aligned.
Use this slot for anything that you want to be stuck to the base of the card. This region is bottom-aligned.

## Attributes

Expand Down Expand Up @@ -59,10 +59,67 @@ There are several attributes available for customizing the visual treatment of t
## Variables
There are several powerful variables available to hook into and override default styles.

- **Background color**: Though using the `pfe-color` attribute is strongly recommended when setting the background color for the band, you can also use completely custom colors by updating the `--pfe-band--BackgroundColor` variable. If you update this value manually, you should also update the `--context` context variable to invoke the right context on it and it's child elements. Supported contexts include: `light`, `dark`, and `saturated`.
- **Background position**: This is designed for use with the `pfe-img-src` attribute to allow you to align your background image. Default value is `center center`. **Variable name:** `--pfe-card--BackgroundPosition`.
- **Border**: This allows the customization of a border around the entire container. There is a variable for the entire border shorthand (transparent by default) or you can hook into the individual properties. **Variable name:** `--pfe-card--BorderRadius` and `--pfe-card--Border` or `--pfe-card--BorderWeight`, `--pfe-card--BorderStyle`, `--pfe-card--BorderColor`.
- **Padding**: You can customize the padding around the outside of the card container by connecting to either the shortcut padding variable or just one or more of the individual padding regions. **Variable names:** `--pfe-card--Padding` or `--pfe-card--PaddingTop`, `--pfe-card--PaddingRight`, `--pfe-card--PaddingBottom`, `--pfe-card--PaddingLeft`.
- **Background color**: Though using the `color` attribute is strongly recommended when setting the background color for the band, you can also use completely custom colors by updating the `--pfe-band--BackgroundColor` variable. If you update this value manually, you should also update the `--context` variable to invoke the right context on it and it's child elements. Supported contexts include: `light`, `dark`, and `saturated`.
- **Background position**: This is designed for use with the `img-src` attribute to allow you to align your background image. Default value is `center center`.
- **Border**: This allows the customization of a border around the entire container. There is a variable for the entire border shorthand (transparent by default) or you can hook into the individual properties. There is also a separate `border-top` property which is available to add an emphasis border at the top of the card; typically that would consist of setting the variable as follows: `--pfe-card--BorderTop: 4px solid #ee00`.
- **Padding**: You can customize the padding around the outside of the card container by connecting to either the shortcut padding variable or just one or more of the individual padding regions. If you add a header slot to the card, note that the `padding-top` value will not be used, but rather, the `spacing--vertical` value; this is to maintain consistent padding around the text inside the card header.
- **Spacing**: Spacing controls the internal padding for the card. There is a `spacing--vertical` property which controls spacing between regions of the card (header, body, footer) and a `spacing--horizontal` which controls spacing between items in the footer region.

| Variable name | Fallback |
| --- | --- |
| **Display properties** |
| `--pfe-card--AlignSelf` | stretch |
| `--pfe-card--context` | `var(--pfe-theme--color--surface--base--context, light)` |
| **Padding/spacing properties** |
| `--pfe-card--PaddingTop` | `calc(--pfe-theme--container-spacer, 1rem) * 2` |
| `--pfe-card--PaddingRight` | `calc(--pfe-theme--container-spacer, 1rem) * 2)` |
| `--pfe-card--PaddingBottom` | `calc(--pfe-theme--container-spacer, 1rem) * 2)` |
| `--pfe-card--PaddingLeft` | `calc(--pfe-theme--container-spacer, 1rem) * 2)` |
| `--pfe-card--Padding` | Combination of the top, right, bottom, and left properties above |
| `--pfe-card--region--spacing` | `var(--pfe-theme--container-spacer, 1rem)` |
| `--pfe-card--spacing--vertical` | `var(--pfe-theme--content-spacer, 1.5rem)` |
| `--pfe-card--spacing--horizontal` | `calc(var(--pfe-theme--content-spacer, 1.5rem) / 2)` |
| **Border properties** |
| `--pfe-card--BorderRadius` | `var(--pfe-theme--surface--border-radius, 3px)` |
| `--pfe-card--BorderWidth` | 0 |
| `--pfe-card--BorderStyle` | solid |
| `--pfe-card--BorderColor` | var(--pfe-theme--color--surface--border, #d2d2d2) |
| `--pfe-card--Border` | `--pfe-card--BorderWidth`, `--pfe-card--BorderStyle`, `--pfe-card--BorderColor` |
| `--pfe-card--BorderTop` | `--pfe-card--Border` |
| **Background properties** |
| `--pfe-card--BackgroundColor` | `var(--pfe-theme--surface--base, #f0f0f0)` |
| `--pfe-card--BackgroundImage` | |
| `--pfe-card--BackgroundAttachment` | |
| `--pfe-card--BackgroundPosition` | center center |
| `--pfe-card--BackgroundRepeat` | |
| `--pfe-card--BackgroundSize` | |
| **General properties** |
| `--pfe-card--TextAlign` | left |
| **Overlay properties** |
| `--pfe-card__overlay--BackgroundColor` | `rgba(0, 0, 0, var(--pfe-theme--opacity, 0.09))` |
| **Header region properties** |
| `--pfe-card__header--Display` | `flex` |
| `--pfe-card__header--JustifyContent` | |
| `--pfe-card__header--BackgroundColor` | `rgba(0, 0, 0, var(--pfe-theme--opacity, 0.09))` |
| `--pfe-card__header--Color` | `var(--pfe-broadcasted--text, #3c3f42)` |
| **Body region properties** |
| `--pfe-card__body--FlexDirection` | column |
| `--pfe-card__body--FlexWrap` | nowrap |
| `--pfe-card__body--JustifyContent` | |
| `--pfe-card__body--AlignItems` | |
| **Footer region properties** |
| `--pfe-card__footer--AlignItems` | |
| `--pfe-card__footer--FlexDirection` | `row` |
| `--pfe-card__footer--FlexWrap` | `wrap` |
| `--pfe-card__footer--JustifyContent` | |
| `--pfe-card__footer--spacing--horizontal` | `var(--pfe-theme--content-spacer, 1.5rem)` |


### Usage notes

#### Header region
* The display property for the header region is very helpful in situations where you need to have the header content present in the DOM but want it visibly hidden from view. You can do that by setting that property to: `--pfe-card__header--Display: none`.
* If you set the `background-color` of the header region to a color that requires a different context than the rest of the card, please be sure you update the value of the `--pfe-card__header--Color` property to use a font color that works for that `background-color`. There is no `--context` variable for this region at this time.

## Test

Expand All @@ -84,4 +141,4 @@ Card (and all PFElements) use [Prettier][prettier] to auto-format JS and JSON. T

[prettier]: https://github.com/prettier/prettier/
[prettier-ed]: https://prettier.io/docs/en/editors.html
[web-component-tester]: https://github.com/Polymer/web-component-tester
[web-component-tester]: https://github.com/Polymer/web-component-tester
63 changes: 41 additions & 22 deletions elements/pfe-card/demo/demo.css
Original file line number Diff line number Diff line change
@@ -1,33 +1,52 @@
/* For demo only */
.demo-cards {
display: flex;
flex-wrap: wrap;
pfe-band {
--pfe-band--Width: auto;
}

.demo-cards>* {
margin: 0 16px 32px;
min-width: 200px;
width: calc(25% - 32px);
/* Use this to test updating variables using global scope */
#custom {
--pfe-card--Padding: 25px 15px;
--pfe-card--spacing--vertical: 10px;
--pfe-card--spacing--horizontal: 10px;

--pfe-card--BackgroundColor: papayawhip;
--context: light;
}

#custom pfe-card:not([color]) {
--pfe-card__header--BackgroundColor: rgb(233, 176, 85);
}

#custom pfe-cta[priority] {
--pfe-cta--Padding: 8px 16px;
}

#custom #custom-image {
--pfe-card--BackgroundImage: url("https://placekitten.com/150/80");
--pfe-card--BackgroundPosition: calc(100% - 10px) calc(100% - 10px);
--pfe-card--BackgroundRepeat: no-repeat;
}

#custom #custom-spacing {
--pfe-card--spacing--vertical: 20px;
--pfe-card--spacing--horizontal: 40px;
}

.button-series {
display: inline-block;
margin-bottom: -15px;
margin-left: -15px;
#custom #custom-border {
--pfe-card--BorderColor: #151515;
--pfe-card--BorderWidth: 2px;
--pfe-card--BorderRadius: 20px;
}

.button-series>* {
display: inline-block;
margin-left: 15px;
margin-bottom: 15px;
#custom #custom-header {
--pfe-card__header--BackgroundColor: #0477a4;
--pfe-card__header--Color: #fff;
}

h2[slot="pfe-card--header"] {
font-size: 1.1em;
font-weight: bolder;
#custom #custom-overlay {
--pfe-card__overlay--BackgroundColor: rgba(180, 82, 43, 0.1);
}

.custom-border {
--pfe-card--BorderColor: #eee;
--pfe-card--BorderWeight: 1px;
.pfe-jump-links-panel__section:not(:first-child) {
margin-top: 80px;
margin-bottom: 20px;
}
Loading