Skip to content

Commit b7fd31e

Browse files
starryeyez024castastrophe[ Cassondra ]
authored
fix: pfe-cta simplify and fix font sizing (#1377)
* Simplify and fix font sizing which should be default:18px, priority:16px, disabled: 16px. - remove math which left us with uneven font sizes. We have plenty of hooks to override as needed: custom properties for default, priority, and disabled Co-authored-by: [ Cassondra ] <[email protected]> Co-authored-by: [ Cassondra ] <[email protected]>
1 parent 51bee47 commit b7fd31e

File tree

3 files changed

+10
-18
lines changed

3 files changed

+10
-18
lines changed

CHANGELOG-1.x.md

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

33
### Features
44
- [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).
55

66
### Fixes
7-
- [](https://github.com/patternfly/patternfly-elements/commit/) fix: pfe-content-set requires light DOM styles in panels
7+
- [51bee47](https://github.com/patternfly/patternfly-elements/commit/51bee47d7ef6515b59b2e49b424985088248b4d5) fix: pfe-content-set requires light DOM styles in panels
8+
- [](https://github.com/patternfly/patternfly-elements/commit/) fix: update sizing on pfe-cta component which was too small
89

910
## 1.2.0 ( 2021-02-12 )
1011

elements/pfe-cta/src/pfe-cta.scss

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ $LOCAL-VARIABLES: (
2525
TextDecoration: none,
2626
TextDecoration--hover: none,
2727
TextDecoration--focus: none,
28-
FontWeight: pfe-var(font-weight--semi-bold),
28+
FontWeight: pfe-var(font-weight--bold),
2929
FontFamily: pfe-var(font-family--heading),
30-
FontSize: pfe-var(FontSize--md),
30+
FontSize: pfe-var(FontSize--lg),
31+
// @deprecated | FontSize--priority will be deprecated in 2.0
32+
FontSize--priority: pfe-var(FontSize--md),
3133
LineHeight: pfe-var(line-height),
3234
MaxWidth: max-content,
3335
arrow: (
@@ -43,11 +45,6 @@ $LOCAL-VARIABLES: (
4345
)
4446
);
4547

46-
// Nested internal variables (pfe-local calls), maps cannot "self-reference"
47-
$LOCAL-VARIABLES: map-deep-merge($LOCAL-VARIABLES, (
48-
FontSize--priority: calc(#{pfe-local(FontSize) / 1.125})
49-
));
50-
5148
// Look here for the variant maps
5249
@import "shared-assets";
5350

@@ -56,18 +53,14 @@ $LOCAL-VARIABLES: map-deep-merge($LOCAL-VARIABLES, (
5653
position: relative;
5754
z-index: 0;
5855
vertical-align: middle;
59-
6056
max-width: pfe-local(MaxWidth);
61-
6257
background-color: pfe-local(BackgroundColor);
6358
border-radius: pfe-local(BorderRadius);
6459
border: pfe-var(ui--border-width) pfe-var(ui--border-style) pfe-local(BorderColor);
65-
6660
cursor: pointer;
6761
}
6862

6963
::slotted(*) {
70-
--pf-c--FontSize: #{pfe-local(FontSize)};
7164
white-space: normal;
7265
display: inline;
7366
padding: pfe-local(Padding) !important;
@@ -77,13 +70,10 @@ $LOCAL-VARIABLES: map-deep-merge($LOCAL-VARIABLES, (
7770
font-weight: pfe-local(FontWeight);
7871
line-height: pfe-local(LineHeight);
7972
text-decoration: pfe-local(TextDecoration) !important;
80-
81-
// cursor: pointer;
8273

8374
:host([priority]) & {
84-
--pf-c--FontSize: #{pfe-local(FontSize--priority)};
85-
text-align: center;
8675
font-size: pfe-local(FontSize--priority);
76+
text-align: center;
8777
@include browser-query(ie11) {
8878
a {
8979
color: pfe-local(Color) !important;
@@ -93,6 +83,7 @@ $LOCAL-VARIABLES: map-deep-merge($LOCAL-VARIABLES, (
9383

9484
:host([aria-disabled="true"]) & {
9585
cursor: default !important;
86+
font-size: pfe-local(FontSize, $fallback: pfe-var(FontSize--md));
9687
}
9788

9889
:host([priority]) &,
@@ -286,4 +277,4 @@ $LOCAL-VARIABLES: map-deep-merge($LOCAL-VARIABLES, (
286277
--pfe-cta--TextDecoration: #{pfe-local(TextDecoration--hover)};
287278
--pfe-cta__inner--BorderColor: #{pfe-local(BorderColor--hover, $region: inner)};
288279
--pfe-cta__arrow--Padding: #{$arrow-hover};
289-
}
280+
}
7.42 KB
Loading

0 commit comments

Comments
 (0)