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

Breakpoint config from module #2

Open
rgkimball opened this issue Sep 12, 2014 · 1 comment
Open

Breakpoint config from module #2

rgkimball opened this issue Sep 12, 2014 · 1 comment

Comments

@rgkimball
Copy link
Owner

Replacing the e3.breakpoints object and any aliases (eg. e3.bpmobile) with a config page within Drupal to allow modifying values and changing variable names instead of hardcoding these in e3_utils.js. This would also allow us to reorder breakpoint values in ascending order, so we always know e3.breakpoints[0] is the smallest breakpoint.

@rgkimball
Copy link
Owner Author

Alternatively, use a breakpoints.json file in the theme or module and rewrite _base.scss to parse this so we can keep it out of config and only require updating in one place. This also keeps config-related stuff out of e3.js. Something like this:

{
  "breakpoints": {
    "mobile": "460",
  }
}

Would output a $bp-mobile = 460px variable in Sass and a e3.bpmobile = 460 variable in JS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant