Skip to content

Modernize and simplify CSS - #74

Draft
kytta wants to merge 12 commits into
nextfrom
css
Draft

Modernize and simplify CSS#74
kytta wants to merge 12 commits into
nextfrom
css

Conversation

@kytta

@kytta kytta commented Jul 18, 2023

Copy link
Copy Markdown
Owner

This PR remakes the whole CSS used in the package.

  • old position: absolute hacks get replaced with Flexbox
  • instead of background-image, icons use mask-image. This allows us to change their colour based on button text colour
  • the variables and calc()s aren't compiled away any more, but exposed for customizability. This makes the CSS a bit heavier, but it allows very easy customization. This closes CSS variables are not included in build output聽#147
  • instead of multiple PostCSS plugins, Lightning CSS is now used to minify styles. It's way faster and more effective

Overall, the appearance of the buttons has become way more customizable. One can make the buttons vertical with a single line of CSS, change their radius and size, and more!

@kytta kytta self-assigned this Jul 18, 2023
@github-actions

github-actions Bot commented Jul 18, 2023

Copy link
Copy Markdown
Contributor

size-limit report 馃摝

Path Size
./dist/shareon.min.css 5.44 KB (+0.38% 馃敽)
./dist/shareon.es.js 879 B (0%)

@kytta kytta mentioned this pull request Jul 18, 2023
4 tasks
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.

1 participant