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

[Feature] mq.query: Add js mediaquery #5

Merged
merged 4 commits into from
Nov 12, 2015

Conversation

d-simon
Copy link
Contributor

@d-simon d-simon commented Aug 29, 2015

Allows for js-based mediaqueries as described in #4 :

estatico.mq.query({ to: 'small' }); // false
estatico.mq.query({ from: 'small' }); // true
estatico.mq.query({ from: 'small', to: 'large' }); // true

if (estatico.mq.query({ from: 'small' })) {
    // ...
}

I haven't added any tests or jsdoc. Thoughts?

@backflip
Copy link
Collaborator

Slightly delayed: Awesome, thanks!!

Some cosmetic things commented in the code.

Something I'm wondering right now is whether we should stop exposing currentBreakpoint at this point since it doesn't really make too much sense any more. Thoughts?

Ping @stigmata86

breakpointCurrent = parseInt(estatico.mq.currentBreakpoint.value, 10);

if (typeof options !== 'object') {

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use empty lines at the top or bottom of a block's content.

@d-simon
Copy link
Contributor Author

d-simon commented Nov 7, 2015

About the current breakpoint: It could still come in handy, when one simply wants to compare the current breakpoint. Although perhaps there is a better way to do this? For example:

estatico.mq.query({ current: 'large' });

backflip added a commit that referenced this pull request Nov 12, 2015
[Feature] mq.query: Add js mediaquery
@backflip backflip merged commit 81c043d into unic:develop Nov 12, 2015
@backflip
Copy link
Collaborator

We will have to check in some specific use cases, but this is already great for now. Thanks a lot!

ol-ko pushed a commit that referenced this pull request Jan 21, 2016
…evelop

* commit 'f892eb972e6e2e64b74c366993fe843cdb536099':
  ESTATICO-178: Use bower to load bind polyfill, optimize js:qunit task to handle array of polyfill globs
  ESTATICO-178: Update jQuery to 2.1.3
  ESTATICO-178: Use native JS functions over some jQuery ones
  removed occurrences of $.proxy and _.bind in favor of native javascript bind method
orioltf pushed a commit that referenced this pull request Mar 8, 2017
…-78-apply-generic-styles to develop

* commit '028fbd3f9575804e34d46d8448f5dc86c71b6443':
  CONCOREL-78: Basic styles for tables
  CONCOREL-78: Update headings styles after design change
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.

2 participants