Skip to content

Commit

Permalink
fix: add missing tokens for Button component (openedx#1924)
Browse files Browse the repository at this point in the history
  • Loading branch information
PKulkoRaccoonGang authored and monteri committed Aug 17, 2023
1 parent 892e222 commit 35e4944
Show file tree
Hide file tree
Showing 16 changed files with 1,896 additions and 372 deletions.
2 changes: 1 addition & 1 deletion scss/core/css/utility-classes.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* IMPORTANT: This file is the result of assembling design tokens
* Do not edit directly
* Generated on Tue, 31 Jan 2023 09:38:46 GMT
* Generated on Wed, 15 Feb 2023 14:44:39 GMT
*/

.bg-dark {
Expand Down
348 changes: 315 additions & 33 deletions scss/core/css/variables.css

Large diffs are not rendered by default.

49 changes: 0 additions & 49 deletions src/Button/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,52 +12,3 @@
// Manually declare to provide an override to the browser default
@include border-radius($border-radius, 0);
}

// ------------------------
// BELOW ARE EDX EXTENSIONS
// ------------------------
@mixin button-focus($ring-color) {
&.focus,
&:focus {
position: relative;
outline: 0;
box-shadow: none;

$distance: calc(#{$btn-focus-width} + #{$btn-focus-gap});
$distance-include-btn-border: calc(#{$distance} + #{$btn-border-width});

&::before {
content: "";
position: absolute;
top: calc(#{$distance-include-btn-border} * -1);
right: calc(#{$distance-include-btn-border} * -1);
bottom: calc(#{$distance-include-btn-border} * -1);
left: calc(#{$distance-include-btn-border} * -1);
border: solid $btn-focus-width $ring-color;
border-radius: calc(#{$btn-border-radius} + #{$distance});
}

&.btn-lg::before {
border-radius: calc(#{$btn-border-radius-lg} + #{$distance});
}

&.btn-sm::before {
border-radius: calc(#{$btn-border-radius-sm} + #{$distance});
}

&:active,
&.active {
&::before {
opacity: .75;
}
}

// Disabled buttons should not have focus rings
&:disabled,
&.disabled {
&::before {
display: none;
}
}
}
}
291 changes: 286 additions & 5 deletions src/Button/_variables.scss

Large diffs are not rendered by default.

Loading

0 comments on commit 35e4944

Please sign in to comment.