Skip to content

Commit 8771887

Browse files
committed
fix(select): restore and fix chevron
Closes #1801
1 parent 12af6fd commit 8771887

File tree

4 files changed

+23
-30
lines changed

4 files changed

+23
-30
lines changed

.changeset/empty-cougars-remain.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@patternfly/pfe-select": patch
3+
---
4+
5+
Restores chevrom in pfe-select, and passes click events on it to the select menu.

.changeset/soft-radios-hear.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@patternfly/pfe-sass": major
3+
---
4+
5+
Removes `pfe-arrow` SASS mixin. This mixin was only used in one place,
6+
pfe-select, so it's contents were transfered to that file.

core/pfe-sass/mixins/_mixins.scss

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use 'sass:map';
2+
13
@mixin browser-query($browser-list) {
24
@each $browser in $browser-list {
35
@if $browser == edge12 {
@@ -31,26 +33,6 @@
3133
transition: $return;
3234
}
3335

34-
// Make a CSS arrow
35-
@mixin pfe-arrow($type, $color, $width: 8px, $height: 5px, $pseudo: false) {
36-
$direction: (
37-
up: 180deg,
38-
down: 0deg,
39-
right: -90deg,
40-
left: 90deg,
41-
);
42-
border-style: pfe-var(surface--border-style);
43-
border-width: $width $height 0;
44-
border-color: transparent;
45-
border-top-color: $color;
46-
transform: rotate(map-get($direction, $type));
47-
@if $pseudo {
48-
display: inline-block;
49-
content: "";
50-
@content;
51-
}
52-
}
53-
5436
@mixin pfe-arrow-color($color) {
5537
border-top-color: $color;
5638
}

elements/pfe-select/pfe-select.scss

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@
4545
color: pfe-local(Color);
4646

4747
&::after {
48-
@include pfe-arrow(
49-
$type: down,
50-
$color: $pf-color-black-800,
51-
$width: 6px,
52-
$height: 6px,
53-
$pseudo: true) {
54-
position: absolute;
55-
top: calc(#{pfe-var(container-padding)} * 0.875);
56-
right: calc(#{pfe-var(container-padding)} * 0.75);
57-
}
48+
border-style: pfe-var(surface--border-style);
49+
border-width: 6px 6px 0;
50+
border-color: transparent;
51+
border-top-color: $pf-color-black-800;
52+
display: inline-block;
53+
content: "";
54+
position: absolute;
55+
pointer-events: none;
56+
top: calc(#{pfe-var(container-padding)} * 0.875);
57+
right: calc(#{pfe-var(container-padding)} * 0.75);
5858
}
5959

6060
@at-root #{&}([hidden]) {

0 commit comments

Comments
 (0)