Skip to content

Commit 6eed4c3

Browse files
Fix: Reduce pfe-cta arrow spacing, bring closer to text (#844)
* Reduce CTA arrow spacing, bring closer to text * Remove render flicker on hover by removing transition prop * Simplify math with Sass Co-authored-by: [ Cassondra ] <[email protected]>
1 parent f392a0f commit 6eed4c3

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

CHANGELOG-prerelease.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
- [27fee5f](https://github.com/patternfly/patternfly-elements/commit/27fee5f5c5eb021ac126f3767dd0299f5cda8231) fix: pfe-tabs check for tagName on addedNode mutation before continuing
44
- [2c950b0](https://github.com/patternfly/patternfly-elements/commit/2c950b08f7638787df50aa5ee6738f1205ea3a9d) fix: Add clearfix within tab and accordion panels
55
- [96f0a1b](https://github.com/patternfly/patternfly-elements/commit/96f0a1bdf9c758650e02b20a63ee3fb2fcf11bc9) feat: Add border to the card component
6-
- [](https://github.com/patternfly/patternfly-elements/commit/) fix: Generator needs to convert slot-name to camelCase in js file if dash exists
6+
- [f392a0f](https://github.com/patternfly/patternfly-elements/commit/f392a0f0eeac3b0379794eff4a1b2946e10e883a) fix: Generator needs to convert slot-name to camelCase in js file if dash exists
7+
- [](https://github.com/patternfly/patternfly-elements/commit/) fix: adjust arrow spacing & alignment on pfe-cta
8+
79

810
## Prerelese 45 ( 2020-04-27 )
911

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ $LOCAL: cta;
66
$pfe-cta--BackgroundColor--focus: rgba(40, 151, 240, 0.2);
77
$pfe-cta--Color--fallback: #003366;
88

9+
// Arrow animation
10+
$horizontal-spacing: 3px;
11+
$arrow-basic: 0 $horizontal-spacing;
12+
$arrow-hover: 0 0 0 #{$horizontal-spacing * 2};
13+
14+
915
$variables: (
1016
Padding: 0.6rem 0,
1117
BorderRadius: 0,
@@ -26,7 +32,7 @@ $variables: (
2632
FontSize--priority: calc(#{pfe-local($cssvar: FontSize) / 1.125}),
2733
arrow: (
2834
Display: inline,
29-
Padding: 0 0.125rem 0 0.375rem,
35+
Padding: #{$arrow-basic},
3036
size: 13px,
3137
MarginLeft: calc(#{pfe-var(content-spacer)} * 0.25)
3238
),
@@ -40,13 +46,10 @@ $variables: (
4046
:host {
4147
@include pfe-print-variables($variables);
4248

43-
// properties
4449
display: inline-block;
4550
position: relative;
4651
z-index: 0;
4752
vertical-align: middle;
48-
transition: padding #{pfe-var(animation-speed)} #{pfe-var(animation-timing)};
49-
5053
background-color: #{pfe-local(BackgroundColor)};
5154
border-color: #{pfe-local(BorderColor)};
5255

@@ -76,7 +79,7 @@ $variables: (
7679
:host(:hover),
7780
:host(:hover) ::slotted(*),
7881
::slotted(:hover) {
79-
--pfe-cta__arrow--Padding: 0 0 0 0.5rem;
82+
--pfe-cta__arrow--Padding: #{$arrow-hover};
8083
}
8184

8285
:host(:hover) {
@@ -194,7 +197,7 @@ $variables: (
194197
width: #{pfe-local($cssvar: size, $region: arrow)};
195198
height: #{pfe-local($cssvar: size, $region: arrow)};
196199
transition: padding #{pfe-var(animation-speed)} #{pfe-var(animation-timing)};
197-
200+
margin-bottom: -1px;
198201
:host(.focus-within) & {
199202
fill: #{pfe-local(Color--focus)};
200203
}

0 commit comments

Comments
 (0)