Skip to content

Comments

Create new shadow package#520

Merged
jxnblk merged 3 commits intostyled-system:v5from
mfix22:shadow-package
Jun 2, 2019
Merged

Create new shadow package#520
jxnblk merged 3 commits intostyled-system:v5from
mfix22:shadow-package

Conversation

@mfix22
Copy link
Contributor

@mfix22 mfix22 commented May 31, 2019

No description provided.

@jxnblk
Copy link
Member

jxnblk commented Jun 1, 2019

Yeah, I'm sort of unsure what to do about some of the miscellaneous properties in the library, there's also opacity and overflow which seem like they don't clearly fit anywhere...

Shadows seems sensible though

@jxnblk
Copy link
Member

jxnblk commented Jun 1, 2019

Looking at https://primer.style/components/docs/system-props – maybe overflow belongs in the layout package...

@mfix22
Copy link
Contributor Author

mfix22 commented Jun 1, 2019

If you don't think these props should even be included, let me know. I don't think I have used any of the props specifically.

If I were to take a stab at putting them somewhere I would say:

  • overflow: layout
  • opacity: color

But it doesn't feel like a 100% fit.

Another random thought: what if we put boxShadow in borders? Especially with things like box-shadow inset, lots of people use it to replace border effects. Thoughts?

@jxnblk
Copy link
Member

jxnblk commented Jun 2, 2019

Yeah, I think it'd make sense to have a shadow package like you have here and moving overflow to layout and opacity to color

@mfix22 mfix22 marked this pull request as ready for review June 2, 2019 00:46
property: 'textShadow',
scale: 'shadows',
},
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! For the v5 packages, I've been grouping all the utilities into categories so that one import/function will add several style props. E.g. with typography, it adds fontFamily, fontSize, lineHeight, etc. as props. I think this shadow package could follow the same format, where one shadow function adds both boxShadow and textShadow props. To do the same here, it'd mean combining the two system calls into a single one and merging the two configuration options

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to merge this as-is and combine these in the v5 branch

@jxnblk jxnblk merged commit 031f857 into styled-system:v5 Jun 2, 2019
@mfix22 mfix22 deleted the shadow-package branch June 2, 2019 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants