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

Use lang HTML attribute instead of a css class #219

Closed
gpbl opened this issue Oct 9, 2016 · 0 comments
Closed

Use lang HTML attribute instead of a css class #219

gpbl opened this issue Oct 9, 2016 · 0 comments
Milestone

Comments

@gpbl
Copy link
Owner

gpbl commented Oct 9, 2016

When setting the locale, a DayPicker--locale class is added to the root node (e.g. DayPicker--en when locale="en"). This may break support for CSS modules (#73). We can use instead the standard lang="locale" attribute (e.g. lang="en") that can also be used via CSS by setting a [lang] attributed selector.

@gpbl gpbl added this to the v3 milestone Oct 9, 2016
kmamykin added a commit to kmamykin/react-day-picker that referenced this issue Dec 7, 2016
...to be able to style based on locale.
Takes care of gpbl#219

Example css (using css modules):

```css
  .container {
    outline: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    padding: 1rem 0;
    user-select: none;
  }

  .container[lang="en"] {
    background-color: red;
  }
```
@gpbl gpbl closed this as completed in aded277 Feb 10, 2017
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

No branches or pull requests

1 participant