Skip to content

Commit a37aaec

Browse files
docs: Update pfe-typography documentation in readme (#1530)
* feat: Update pfe-base to include text broadcast styles * Update CHANGELOG-1.x.md * feat: Update readme * Update elements/pfe-styles/src/pfe-base.scss * Update CHANGELOG-1.x.md * Update elements/pfe-styles/src/pfe-base.scss Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 1139336 commit a37aaec

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

CHANGELOG-1.x.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
- [84cb0b1](https://github.com/patternfly/patternfly-elements/commit/84cb0b1ea257a33dc28954367e82771bb3e17a52) fix: Updated CSS to allow CSS custom properties to override dynamically calculated theme context
4747
- [bdc14f7](https://github.com/patternfly/patternfly-elements/commit/bdc14f7c5e0d1fa0bf23ec3911b7f0b745a310ea) feat: Add a new readtime component to display estimated time to read content
4848

49-
5049
# 1.4.0 (2021-03-30)
5150

5251
- [76c2c36](https://github.com/patternfly/patternfly-elements/commit/76c2c3689a9a338b278d99f6e2d3cbeef4f3cc3d) feat: Add performance marks to PFElement for more accurate reporting on performance

elements/pfe-styles/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,19 @@ To get started, include a link to the css file of your choice:
1616
Since PatternFly Elements Styles are not web components, their classes can be applied to any element, giving you lots of control over where and how you utilize them.
1717

1818
- `pfe-base.css`
19-
- This stylesheet provides normalize styles, and styles for standard typographical HTML tags such as `<ul>`, `<h2>`, etc. However they are opt-in, in that you must use the wrapper class of `.pfe-c-content` around them. We recommend loading this as a standard stylesheet in your project
19+
- This stylesheet provides normalize styles and styles for standard typographical HTML tags such as `<ul>`, `<h2>`, etc.
20+
- The typographical elements are opt-in, in that you must use the wrapper class of `.pfe-c-content` around them for them to be applied.
21+
- The "normalize" settings are very lightweight and help clear common issues with default browser styles such as collapsing borders on tables or clearing padding and margins on `ul` tags.
22+
- We recommend loading this as a standard stylesheet in your project
2023
- `pfe-typography-classes.css`
21-
- This stylesheet includes modifier clases you may use with any markup to invoke those particular heading styles. Please see https://ux.redhat.com/foundations/typography/ for details on styles. Useful if you do not already have typographical classes defined.
24+
- This stylesheet includes modifier clases you may use with any markup to invoke those particular heading styles. Please see the [documentation](https://ux.redhat.com/foundations/typography) for additional details on styles. This is very useful if you do not already have typographical classes defined.
2225
- `pfe-vars-as-px.css`
2326
- This is a demo file to show how you may reset the core t-shirt sizing variables using pixels, if you are unable to use REM units in your project.
2427
- `pfe-context.css`
25-
- This set is available to help in updating the broadcast variables for pages where your might be setting the background color yourself with custom styles. If you manually set a background color to #000, you can add the `.on-dark` class to your element and it will load the broadcast variables for a dark context to make your life a little easier.
28+
- This set is available to help in managing context in raw markup. Components will handle setting context for you when they are used to set surface colors but if you have raw HTML setting the surface color, we recommend making use of this lightweight set of styles that update the broadcast variables for you or let you use the built-in surface colors.
29+
- If you manually set a background color to #000, you can add the `.on-dark` class to your element and it will load the broadcast variables for a dark context.
30+
- If you want to manually set an element to the accent surface color, you can use `.surface--accent` to set the background color along with appropriate context variables.
31+
- All of this is to make development just a little easier but is entirely optional.
2632
- **(mobile styles)**
2733
- Please inspect the [mobile typography demo page](http://patternflyelements.com/elements/pfe-styles/demo/typography-mobile.html) for examples of how to scale type for smaller devices.
2834

elements/pfe-styles/src/pfe-base.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ th {
8484
body {
8585
@extend %pfe-content-base;
8686
/* This variable is intentionally left empty for light DOM within components */
87-
font-size: var( --pf-c--FontSize, pfe-var(content--FontSize));
87+
font-size: var(--pf-c--FontSize, #{pfe-var(content--FontSize)});
8888
color: pfe-var(text);
8989
text-align: left;
9090
margin: 0;

0 commit comments

Comments
 (0)