8000 Support for every property by MartijnCuppens · Pull Request #144 · twbs/rfs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Support for every property #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 28, 2019
Merged

Support for every property #144

merged 1 commit into from
Aug 28, 2019

Conversation

MartijnCuppens
Copy link
Member
@MartijnCuppens MartijnCuppens commented Jul 10, 2019

So far RFS could be used to rescale font sizes, but with the new implementation other properties can also make use of rfs' rescaling mechanism.

Features

  • Support for all properties
  • Shorthand mixins for margins and paddings
  • Support for custom properties

Changes

  • Clearer way to declare !important rules: @include rfs(1rem !important) instead of @include rfs(1rem, true)
  • Switched to mobile first approach, still possible to switch to the max-width media queries if needed
  • px-values should always have a unit now. In v8, RFS assumed every unitless value was set in px (eg. @include rfs(32)), but since we can now pass numbers too (eg. @include rfs(1 1 30rem, flex), this behaviour is changed.
  • Configuration variables are changed:
    • Base font size → Base value
    • Font size unit → unit

PostCSS implementation change

Drops

  • Dropped responsive-font-size mixins
  • Dropped Less 2 support since we had to work with lists

Meta

  • Prevent generation of /test/expected/main.css
  • Additional tests for new implementations
  • Cleanup npm scripts examples
  • postcss-value-parser dependency added to parse values in PostCSS plugin.

Demos

TODOs

  • Clean up git
  • Update documentation
  • Check for outdated info
  • Link to example(s)
  • Use postcss-value-parser to parse values to prevent issues with nested functions (like calc() or rgba())
  • Document CSS Properties support
  • Expose rfsValue and rfsFluidValue functions so that they can be used by other js plugins or node applications

Fixes #116
Fixes #139
Fixes #154

@MartijnCuppens
Copy link
Member Author

@XhmikosR, this one is ready for review. postcss-value-parser is added as dependency to parse values in postcss.

#150 should be merged first

- Support for all properties
- Shorthand mixins for margins and paddings
- Support for custom properties
- Clearer way to declare `!important` rules: `@include rfs(1rem !important)` instead of `@include rfs(1rem, true)`
- Switched to mobile first approach, still possible to switch to the `max-width` media queries if needed
- Configuration variables are changed:
	- Base font size -> Base value
	- Font size unit -> Unit
- `responsive-font-size` property changed to `rfs()` function (see #116)
- Dropped `responsive-font-size` mixins
- Dropped Less 2 support since we had to work with lists
- Prevent generation of `/test/expected/main.css`
- Additional tests for new implementations
- Cleanup npm scripts examples
- Code examples in `README.md` are grouped by processor and collapsed
@MartijnCuppens MartijnCuppens merged commit 89f7a63 into master Aug 28, 2019
@MartijnCuppens MartijnCuppens deleted the v9 branch August 28, 2019 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v9 Ideas for v9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix spaces before semicolon at set the calculated font-size part Using CSS variables with postCSS 3D96 Alternative PostCSS implementation
3 participants
0