Skip to content
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

Support custom property --scroll-behavior #21

Closed
jonaskuske opened this issue Feb 24, 2019 · 1 comment
Closed

Support custom property --scroll-behavior #21

jonaskuske opened this issue Feb 24, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jonaskuske
Copy link
Owner

Support usage of a CSS custom property --scroll-behavior

While the current workaround using font-family is the only reliable way of putting custom information into CSS that works across all browsers, every modern browser supports custom properties.

To make this package more approachable (and not immediately confront users with a reliable but sketchy-looking CSS hack), the custom property --scroll-behavior should be both supported and recommended as the default way to set scroll behavior.

The font-family workaround (and inline styles) will continue to be supported, but it should be clearly communicated that this is only to support legacy browsers like Internet Explorer – for users that are only looking to bring smooth scrolling to modern browsers like Edge and Safari, --scroll-behavior is enough.

postcss-smoothscroll-anchor-polyfill needs to be updated in accordance with this, transpiling scroll-behavior to --scroll-behavior and only creating the font-family workaround if the users browserslist includes support for legacy browsers.

@jonaskuske jonaskuske added the enhancement New feature or request label Feb 24, 2019
@jonaskuske jonaskuske self-assigned this Feb 24, 2019
@jonaskuske
Copy link
Owner Author

Fixed with v.1.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant