Skip to content

Commit

Permalink
Add table css properties to sprinkles (#793)
Browse files Browse the repository at this point in the history
* Add table css properties to sprinkles

* Add changeset

* Add selector border styles

* Add selector paddings

* Remove all-direction padding from selectors
  • Loading branch information
Droniu authored Apr 29, 2024
1 parent 2039dac commit c7b7d19
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/cyan-dodos-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@saleor/macaw-ui": patch
---

This change adds border-collapse to sprinkles as well as child selectors
14 changes: 14 additions & 0 deletions src/theme/sprinkles.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ const responsiveProperties = defineProperties({
alignSelf: ["auto", "normal", "end", "center", "start"],
justifySelf: ["auto", "normal", "end", "center", "start"],
visibility: ["visible", "hidden"],
borderCollapse: ["collapse"],
},
shorthands: {
padding: ["paddingTop", "paddingBottom", "paddingLeft", "paddingRight"],
Expand Down Expand Up @@ -218,10 +219,23 @@ const stateProperties = defineProperties({
active: { selector: "&:active" },
disabled: { selector: "&[disabled]" },
placeholder: { selector: "&::placeholder" },
firstChild: { selector: "&:first-child" },
lastChild: { selector: "&:last-child" },
oddChild: { selector: "&:nth-child(odd)" },
evenChild: { selector: "&:nth-child(even)" },
},
defaultCondition: "default",
properties: {
borderColor: { ...vars.colors.border, transparent: "transparent" },
borderStyle: ["none", "solid"],
borderLeftStyle: ["none", "solid"],
borderRightStyle: ["none", "solid"],
borderTopStyle: ["none", "solid"],
borderBottomStyle: ["none", "solid"],
paddingLeft: vars.spacing,
paddingRight: vars.spacing,
paddingTop: vars.spacing,
paddingBottom: vars.spacing,
color: { ...vars.colors.text, inherit: "inherit" },
backgroundColor: { ...vars.colors.background, transparent: "transparent" },
pointerEvents: ["none", "auto"],
Expand Down

0 comments on commit c7b7d19

Please sign in to comment.