2023-04-27 20:39:40 +00:00
|
|
|
.cdx-button:not( .cdx-button--icon-only ) .vector-icon {
|
|
|
|
// Add spacing between icon and text
|
|
|
|
margin-right: @spacing-35;
|
|
|
|
}
|
|
|
|
|
|
|
|
.cdx-button {
|
|
|
|
// Needed to horizontaly center icon buttons (floating TOC button, watchstar button)
|
|
|
|
// Can be seen on small viewports due to the fact that we arent using `.cdx-button--size-large`
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
|
2023-07-24 17:35:25 +00:00
|
|
|
// These rules are scoped to Vector headers due to T342190 as otherwise where buttons are used alongside
|
|
|
|
// input elements the display can look "off".
|
|
|
|
// Any other instances outside headers should be targeted directly by a rule on the element itself.
|
|
|
|
#p-lang-btn-label.cdx-button--icon-only,
|
|
|
|
#vector-page-titlebar-toc-label,
|
|
|
|
.vector-header .cdx-button.cdx-button--icon-only {
|
2023-04-27 20:39:40 +00:00
|
|
|
// Increase padding on small viewports
|
|
|
|
// FIXME: Replace with Codex solution i.e. `.cdx-button--size-large`
|
|
|
|
@media ( max-width: @max-width-tablet ) {
|
|
|
|
@min-size-interactive-touch: 44px;
|
|
|
|
min-width: @min-size-interactive-touch;
|
|
|
|
min-height: @min-size-interactive-touch;
|
|
|
|
}
|
2023-07-25 16:15:46 +00:00
|
|
|
}
|
2023-04-27 20:39:40 +00:00
|
|
|
|
2023-07-25 16:15:46 +00:00
|
|
|
// Hide text in icon only buttons
|
|
|
|
.cdx-button.cdx-button--icon-only {
|
2023-04-27 20:39:40 +00:00
|
|
|
span + span {
|
|
|
|
.mixin-screen-reader-text();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.vector-button-flush-left {
|
|
|
|
@media ( min-width: @min-width-desktop ) {
|
|
|
|
.cdx-mixin-button-layout-flush( 'start', true );
|
|
|
|
}
|
|
|
|
|
|
|
|
@media ( max-width: @max-width-tablet ) {
|
|
|
|
.cdx-mixin-button-layout-flush( 'start', true, 'large' );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.vector-button-flush-right {
|
|
|
|
@media ( min-width: @min-width-desktop ) {
|
|
|
|
.cdx-mixin-button-layout-flush( 'end', true );
|
|
|
|
}
|
|
|
|
|
|
|
|
@media ( max-width: @max-width-tablet ) {
|
|
|
|
.cdx-mixin-button-layout-flush( 'end', true, 'large' );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Handle button styles in checkbox hack, copied from Codex
|
|
|
|
// FIXME: Remove these styles when Codex supports the checkbox hack in T333394
|
2023-06-26 16:54:44 +00:00
|
|
|
input:hover + .cdx-button:not( .cdx-button--action-progressive ) {
|
2023-04-27 20:39:40 +00:00
|
|
|
background-color: @background-color-button-quiet--hover;
|
|
|
|
}
|
|
|
|
|
2023-06-26 16:54:44 +00:00
|
|
|
input:active + .cdx-button:not( .cdx-button--action-progressive ) {
|
2023-04-27 20:39:40 +00:00
|
|
|
background-color: @background-color-button-quiet--active;
|
|
|
|
color: @color-emphasized;
|
|
|
|
border-color: @border-color-interactive;
|
|
|
|
}
|
|
|
|
|
2023-06-26 16:54:44 +00:00
|
|
|
input:focus:not( :active ) + .cdx-button:not( .cdx-button--action-progressive ) {
|
2023-04-27 20:39:40 +00:00
|
|
|
border-color: @border-color-progressive--focus;
|
|
|
|
box-shadow: @box-shadow-inset-small @box-shadow-color-progressive--focus;
|
|
|
|
}
|
|
|
|
|
2023-06-26 16:54:44 +00:00
|
|
|
input:hover + .cdx-button.cdx-button--action-progressive {
|
2023-04-27 20:39:40 +00:00
|
|
|
background-color: @background-color-progressive-subtle;
|
|
|
|
color: @color-progressive--hover;
|
|
|
|
}
|
|
|
|
|
2023-06-26 16:54:44 +00:00
|
|
|
input:active + .cdx-button.cdx-button--action-progressive {
|
2023-04-27 20:39:40 +00:00
|
|
|
background-color: @background-color-progressive--active;
|
|
|
|
color: @color-inverted;
|
|
|
|
border-color: @border-color-progressive--active;
|
|
|
|
}
|
|
|
|
|
2023-06-26 16:54:44 +00:00
|
|
|
input:focus:not( :active ) + .cdx-button.cdx-button--action-progressive {
|
2023-04-27 20:39:40 +00:00
|
|
|
border-color: @border-color-progressive--focus;
|
|
|
|
box-shadow: @box-shadow-inset-small @box-shadow-color-progressive--focus @box-shadow-inset-medium @box-shadow-color-inverted;
|
|
|
|
}
|