Skip to content

Commit

Permalink
Merge pull request #11 from edx/bseverino/WS-4601-btn-fixes
Browse files Browse the repository at this point in the history
WS-4601: button fixes
  • Loading branch information
bseverino authored May 7, 2024
2 parents cfc2520 + 16535ce commit b463016
Show file tree
Hide file tree
Showing 15 changed files with 1,698 additions and 419 deletions.
2 changes: 1 addition & 1 deletion paragon/css/core/custom-media-breakpoints.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* IMPORTANT: This file is the result of assembling design tokens
* Do not edit directly
* Generated on Mon, 22 Apr 2024 21:11:50 GMT
* Generated on Tue, 07 May 2024 17:30:46 GMT
*/

9 changes: 4 additions & 5 deletions paragon/css/core/variables.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 Mon, 22 Apr 2024 21:11:50 GMT
* Generated on Tue, 07 May 2024 17:30:46 GMT
*/

:root {
Expand Down Expand Up @@ -80,10 +80,9 @@
--pgn-size-form-input-radius-border-sm: 0;
--pgn-size-form-input-radius-border-lg: 0;
--pgn-size-form-input-radius-border-base: 0;
--pgn-size-btn-focus-border-radius: 0px;
--pgn-size-btn-border-radius-sm: 0px;
--pgn-size-btn-border-radius-lg: 0px;
--pgn-size-btn-border-radius-base: 0px;
--pgn-size-btn-border-radius-sm: 100px;
--pgn-size-btn-border-radius-lg: 100px;
--pgn-size-btn-border-radius-base: 100px;
--pgn-size-border-radius-sm: .375rem;
--pgn-size-border-radius-lg: .375rem;
--pgn-size-border-radius-base: .375rem;
Expand Down
467 changes: 273 additions & 194 deletions paragon/css/themes/light/variables.css

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions tokens/src/core/components/Button/core.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,20 @@
"btn": {
"border": {
"radius": {
"base": { "value": "0px" },
"lg": { "value": "0px" },
"sm": { "value": "0px" }
"base": { "value": "100px", "type": "dimension", "source": "$btn-border-radius" },
"lg": { "value": "100px", "type": "dimension", "source": "$btn-border-radius-lg" },
"sm": { "value": "100px", "type": "dimension", "source": "$btn-border-radius-sm" }
}
},
"focus": {
"border-radius": {
"value": "0px"
"base": {
"value": "calc({size.btn.border.radius.base} + {spacing.btn.focus.border-gap})",
"type": "dimension",
"source": "$btn-focus-border-radius"
},
"lg": { "value": "{size.btn.focus.border-radius.base}", "type": "dimension", "source": "$btn-focus-border-radius-lg" },
"sm": { "value": "{size.btn.border.radius.base}", "type": "dimension", "source": "$btn-focus-border-radius-sm" }
}
}
}
Expand Down
39 changes: 22 additions & 17 deletions tokens/src/themes/light/components/Button/brand.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
]
},
"outline-brand": {
"value": "{color.primary.base}",
"value": "{color.btn.bg.brand}",
"type": "color",
"source": "$btn-brand-outline-color"
}
},
"bg": {
"brand": {
"value": "{color.primary.base}",
"value": "{color.brand.600}",
"type": "color",
"source": "$btn-brand-bg"
},
"outline-brand": {
"value": "transparent",
"value": "{color.white}",
"type": "color",
"source": "$btn-brand-outline-bg"
}
Expand All @@ -37,7 +37,7 @@
"source": "$btn-brand-border-color"
},
"outline-brand": {
"value": "{color.primary.base}",
"value": "{color.btn.bg.brand}",
"type": "color",
"source": "$btn-brand-outline-border-color"
}
Expand All @@ -55,9 +55,14 @@
]
},
"outline-brand": {
"value": "{color.theme.hover.brand}",
"value": "{color.brand.600}",
"type": "color",
"source": "$btn-brand-outline-hover-color"
"source": "$btn-brand-outline-hover-color",
"modify": [
{
"type": "color-yiq"
}
]
}
},
"bg": {
Expand All @@ -67,19 +72,19 @@
"source": "$btn-brand-hover-bg"
},
"outline-brand": {
"value": "{color.primary.100}",
"value": "{color.brand.600}",
"type": "color",
"source": "$btn-brand-outline-hover-bg"
}
},
"border": {
"brand": {
"value": "{color.theme.hover.brand}",
"value": "{color.btn.hover.bg.brand}",
"type": "color",
"source": "$btn-brand-hover-border-color"
},
"outline-brand": {
"value": "{color.primary.900}",
"value": "{color.btn.hover.bg.outline-brand}",
"type": "color",
"source": "$btn-brand-outline-hover-border-color"
}
Expand Down Expand Up @@ -115,7 +120,7 @@
"source": "$btn-brand-active-bg"
},
"outline-brand": {
"value": "{color.theme.bg.brand}",
"value": "{color.btn.bg.brand}",
"type": "color",
"source": "$btn-brand-outline-active-bg"
}
Expand All @@ -127,7 +132,7 @@
"source": "$btn-brand-active-border-color"
},
"outline-brand": {
"value": "{color.theme.active.brand}",
"value": "{color.btn.bg.brand}",
"type": "color",
"source": "$btn-brand-outline-active-border-color"
}
Expand Down Expand Up @@ -160,12 +165,12 @@
},
"outline": {
"brand": {
"value": "{color.theme.focus.brand}",
"value": "{color.btn.border.brand}",
"type": "color",
"source": "$btn-brand-focus-focus-outline-color"
},
"outline-brand": {
"value": "{color.theme.focus.brand}",
"value": "{color.btn.border.outline-brand}",
"type": "color",
"source": "$btn-brand-outline-focus-outline-color"
}
Expand All @@ -177,7 +182,7 @@
"source": "$btn-brand-focus-bg"
},
"outline-brand": {
"value": "inherit",
"value": "{color.btn.bg.outline-brand}",
"type": "color",
"source": "$btn-brand-outline-focus-bg"
}
Expand All @@ -203,7 +208,7 @@
"source": "$btn-brand-disabled-bg"
},
"outline-brand": {
"value": "inherit",
"value": "{color.btn.bg.outline-brand",
"type": "color",
"source": "$btn-brand-outline-disabled-bg"
}
Expand All @@ -215,12 +220,12 @@
"source": "$btn-brand-disabled-border-color"
},
"outline-brand": {
"value": "{color.btn.hover.text.outline-brand}",
"value": "{color.btn.border.outline-brand}",
"type": "color",
"source": "$btn-brand-outline-disabled-border-color"
}
}
}
}
}
}
}
25 changes: 8 additions & 17 deletions tokens/src/themes/light/components/Button/core.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,28 +78,19 @@
"size": {
"btn": {
"border": {
"width": { "value": "{size.input.btn.border-width}", "type": "dimension", "source": "$btn-border-width" },
"radius": {
"base": { "value": "{size.border.radius.base}", "type": "dimension", "source": "$btn-border-radius" },
"lg": { "value": "{size.border.radius.lg}", "type": "dimension", "source": "$btn-border-radius-lg" },
"sm": { "value": "{size.border.radius.sm}", "type": "dimension", "source": "$btn-border-radius-sm" }
}
"width": { "value": "{size.input.btn.border-width}", "type": "dimension", "source": "$btn-border-width" }
},
"focus": {
"width": { "value": "2px", "type": "dimension", "source": "$btn-focus-width" },
"border-radius": {
"base": {
"value": "calc({size.btn.border.radius.base} + {spacing.btn.focus.border-gap})",
"type": "dimension",
"source": "$btn-focus-border-radius"
},
"lg": { "value": "{size.btn.focus.border-radius.base}", "type": "dimension", "source": "$btn-focus-border-radius-lg" },
"sm": { "value": "{size.btn.border.radius.base}", "type": "dimension", "source": "$btn-focus-border-radius-sm" }
}
"width": { "value": "2px", "type": "dimension", "source": "$btn-focus-width" }
}
}
},
"transition": {
"btn": { "value": "none", "type": "transition", "source": "$btn-transition" }
},
"other": {
"btn": {
"disabled-opacity": { "value": ".3", "type": "ratio", "source": "$btn-disabled-opacity" }
}
}
}
}
Loading

0 comments on commit b463016

Please sign in to comment.