Skip to content
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.

BEM styles for ajax cart #248

Merged
merged 2 commits into from Oct 8, 2014
Merged

BEM styles for ajax cart #248

merged 2 commits into from Oct 8, 2014

Conversation

cshold
Copy link
Contributor

@cshold cshold commented Sep 30, 2014

Moving old, disorganized ajax cart selectors over to BEM.

cc/ @stevebosworth @Shopify/fed

<input type="text" class="js--num" value="{{itemQty}}" min="1" data-id="{{id}}" aria-label="quantity" pattern="[0-9]*" name="{{inputName}}" id="{{inputId}}">
<button type="button" class="js--qty-adjuster js--add" data-id="{{id}}" data-qty="{{itemAdd}}">+</button>
<button type="button" class="js-qty__adjust js-qty__adjust--minus" data-id="{{id}}" data-qty="{{itemMinus}}">&minus;</button>
<input type="text" class="js-qty__num" value="{{itemQty}}" min="1" data-id="{{id}}" aria-label="quantity" pattern="[0-9]*" name="{{inputName}}" id="{{inputId}}">
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpicking but maybe js-qty__qty-num for consistency with ajaxcart__qty-num? It's a weird name but maybe makes a bit more sense?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doesn't that seem redundant? I'm thinking js-qty__num and js-qty__adjust are obvious enough what they do, within their context.

Copy link
Contributor

Choose a reason for hiding this comment

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

ya, was more thinking for readability in a stylesheet. js-qty__qty-num is maybe more explicit that it is is linked/similar in function to ajaxcart__qty-num?

I think that either case has pros and cons so probably just go with yours.

@stevebosworth
Copy link
Contributor

👍

cshold added a commit that referenced this pull request Oct 8, 2014
@cshold cshold merged commit a8f3ec5 into qty-selector Oct 8, 2014
@cshold cshold deleted the bem-ajax branch October 8, 2014 13:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants