2020-02-26 17:09:18 +00:00
|
|
|
.wc-block-components-chip {
|
2020-07-10 09:09:49 +00:00
|
|
|
@include reset-typography();
|
|
|
|
align-items: center;
|
|
|
|
border: 0;
|
|
|
|
display: inline-flex;
|
2022-08-26 13:11:23 +00:00
|
|
|
padding: em($gap-smallest) 0.5em;
|
2020-02-26 17:09:18 +00:00
|
|
|
margin: 0 0.365em 0.365em 0;
|
|
|
|
border-radius: 0;
|
2020-07-10 09:09:49 +00:00
|
|
|
line-height: 1;
|
2020-02-26 17:09:18 +00:00
|
|
|
max-width: 100%;
|
|
|
|
|
2020-07-10 09:09:49 +00:00
|
|
|
// Chip might be a button, so we need to override theme styles.
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
|
|
|
&:active {
|
2022-08-26 13:11:23 +00:00
|
|
|
background: transparent;
|
|
|
|
color: inherit;
|
|
|
|
border: 1px solid;
|
2020-07-10 09:09:49 +00:00
|
|
|
}
|
|
|
|
|
2020-02-26 17:09:18 +00:00
|
|
|
&.wc-block-components-chip--radius-small {
|
|
|
|
border-radius: 3px;
|
|
|
|
}
|
|
|
|
&.wc-block-components-chip--radius-medium {
|
|
|
|
border-radius: 0.433em;
|
|
|
|
}
|
|
|
|
&.wc-block-components-chip--radius-large {
|
2020-07-10 09:09:49 +00:00
|
|
|
border-radius: 2em;
|
|
|
|
padding-left: 0.75em;
|
|
|
|
padding-right: 0.75em;
|
2020-02-26 17:09:18 +00:00
|
|
|
}
|
|
|
|
.wc-block-components-chip__text {
|
2022-08-26 13:11:23 +00:00
|
|
|
@include font-size(smaller);
|
2020-07-10 09:09:49 +00:00
|
|
|
flex-grow: 1;
|
|
|
|
}
|
|
|
|
&.is-removable .wc-block-components-chip__text {
|
|
|
|
padding-right: 0.25em;
|
|
|
|
}
|
2020-02-26 17:09:18 +00:00
|
|
|
.wc-block-components-chip__remove {
|
2020-05-29 10:16:33 +00:00
|
|
|
@include font-size(smaller);
|
2022-08-26 13:11:23 +00:00
|
|
|
background: $gray-200;
|
2020-02-26 17:09:18 +00:00
|
|
|
border: 0;
|
2022-08-26 13:11:23 +00:00
|
|
|
border-radius: 25px;
|
2020-02-26 17:09:18 +00:00
|
|
|
appearance: none;
|
2020-07-10 09:09:49 +00:00
|
|
|
padding: 0;
|
2022-08-26 13:11:23 +00:00
|
|
|
height: 16px;
|
|
|
|
width: 16px;
|
|
|
|
margin: 0;
|
2020-07-10 18:20:57 +00:00
|
|
|
}
|
2020-02-26 17:09:18 +00:00
|
|
|
|
2020-07-10 18:20:57 +00:00
|
|
|
.wc-block-components-chip__remove-icon {
|
|
|
|
vertical-align: middle;
|
2022-08-26 13:11:23 +00:00
|
|
|
fill: $gray-900;
|
2020-02-26 17:09:18 +00:00
|
|
|
}
|
|
|
|
}
|
2020-07-10 09:09:49 +00:00
|
|
|
|
2021-08-05 12:50:06 +00:00
|
|
|
.theme-twentytwentyone {
|
|
|
|
.wc-block-components-chip,
|
|
|
|
.wc-block-components-chip:active,
|
|
|
|
.wc-block-components-chip:focus,
|
|
|
|
.wc-block-components-chip:hover {
|
|
|
|
background: #fff;
|
|
|
|
button.wc-block-components-chip__remove:not(:hover):not(:active):not(.has-background) {
|
|
|
|
background: transparent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-10 09:09:49 +00:00
|
|
|
button.wc-block-components-chip:hover > .wc-block-components-chip__remove,
|
|
|
|
button.wc-block-components-chip:focus > .wc-block-components-chip__remove,
|
|
|
|
.wc-block-components-chip__remove:hover,
|
|
|
|
.wc-block-components-chip__remove:focus {
|
2022-08-26 13:11:23 +00:00
|
|
|
background: $gray-600;
|
|
|
|
|
|
|
|
.wc-block-components-chip__remove-icon {
|
|
|
|
fill: #fff;
|
|
|
|
}
|
2020-07-10 09:09:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
button.wc-block-components-chip:disabled > .wc-block-components-chip__remove,
|
|
|
|
.wc-block-components-chip__remove:disabled {
|
2022-08-26 13:11:23 +00:00
|
|
|
fill: #fff;
|
2020-07-10 09:09:49 +00:00
|
|
|
cursor: not-allowed;
|
|
|
|
}
|