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

BEM class name updates #277

Merged
merged 5 commits into from
Nov 21, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions assets/ajaxify.scss.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,6 @@ form[action^="/cart/add"] {

.ajaxcart__product,
.cart__row {
@include transform-origin(top);
@include transition(all 650ms cubic-bezier(0.57, 0.06, 0.05, 0.95));
@include transform('rotateX(0deg)');
max-height: 500px;
visibility: visible;

Expand All @@ -216,6 +213,7 @@ form[action^="/cart/add"] {
padding: 0;
margin: -1px 0 0 0;
visibility: hidden;
@include transform-origin(top);
@include transform('rotateX(-92deg)');
@include backface(hidden);
@include transition(all 450ms cubic-bezier(0.57,.06,.05,.95));
Expand Down
18 changes: 10 additions & 8 deletions assets/timber.scss.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -882,11 +882,11 @@ hr {
width: 100%;
}

.section-header--title {
.section-header__title {
margin-bottom: $gutter / 2.5;
}

.section-header--left {
.section-header__left {
display: table-cell;
vertical-align: middle;
margin-bottom: 0;
Expand All @@ -897,7 +897,7 @@ hr {
}
}

.section-header--right {
.section-header__right {
display: table-cell;
vertical-align: middle;
text-align: right;
Expand All @@ -909,8 +909,7 @@ hr {
}
}

.section-header--right {

.section-header__right {
.form-horizontal,
.collection-view {
display: inline-block;
Expand Down Expand Up @@ -1743,9 +1742,8 @@ label.error {
}
}

.header-logo {
.site-header__logo {
text-align: center;
font-size: em(40px);
margin: 0 auto ($gutter / 2);
max-width: {{ settings.logo_max_width }}px;

Expand All @@ -1768,7 +1766,7 @@ label.error {
}
}

.site-header--text-links {
.site-header__text-links {
margin-bottom: 0;
}

Expand Down Expand Up @@ -2119,6 +2117,10 @@ label.error {
}
}

.cart__remove {
display: block;
}

/*============================================================================
#Demo Styles - for empty store state
==============================================================================*/
Expand Down
4 changes: 4 additions & 0 deletions config/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ <h3 class="heading">Favicon</h3>
<th><label for="cart_notes_enable">Allow notes with orders</label></th>
<td><input type="checkbox" id="cart_notes_enable" name="cart_notes_enable" value="1" /></td>
</tr>
<tr>
<th><label for="cart_vendor_enable">Show product vendor</label></th>
<td><input type="checkbox" id="cart_vendor_enable" name="cart_vendor_enable" value="1" /></td>
</tr>
<tr>
<th><label for="ajax_cart_enable">Enable Ajaxify Cart</label></th>
<td>
Expand Down
6 changes: 3 additions & 3 deletions layout/theme.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@
Site name gets precedence with H1 tag on homepage, div on other pages.
{% endcomment %}
{% if template == 'index' %}
<h1 class="header-logo large--left" itemscope itemtype="http://schema.org/Organization">
<h1 class="site-header__logo large--left" itemscope itemtype="http://schema.org/Organization">
{% else %}
<div class="h1 header-logo large--left" itemscope itemtype="http://schema.org/Organization">
<div class="h1 site-header__logo large--left" itemscope itemtype="http://schema.org/Organization">
{% endif %}
{% if settings.logo_use_image %}
<a href="/" itemprop="url">
Expand Down Expand Up @@ -113,7 +113,7 @@
If customer accounts are enabled, provide login and create account links
{% endcomment %}
{% if shop.customer_accounts_enabled %}
<p class="site-header--text-links">
<p class="site-header__text-links">
{% if customer %}
{% if customer.first_name != blank %}
{% capture first_name %}<a href="/account">{{ customer.first_name }}</a>{% endcapture %}
Expand Down
4 changes: 2 additions & 2 deletions snippets/collection-list-item.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
{% capture collection_title %}{{ collection.title | escape }}{% endcapture %}

<div class="section-header">
<p class="h1 section-header--left">{{ collection_title }}</p>
<div class="section-header--right">
<p class="h1 section-header__left">{{ collection_title }}</p>
<div class="section-header__right">
<a href="{{ collection.url }}" title="{{ 'collections.general.link_title' | t: title: collection_title }}">More {{ collection_title }} &rsaquo;</a>
</div>
</div>
Expand Down
14 changes: 7 additions & 7 deletions templates/article.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<article class="grid__item large--three-quarters" itemscope itemtype="http://schema.org/Article">

<header class="section-header">
<div class="section-header--left">
<div class="section-header__left">
<h1>{{ article.title }}</h1>
{% assign published_at = article.published_at | date: '%Y-%m-%d' %}
<p>{{ 'blogs.article.author_on_date_html' | t: author: article.author, date: published_at }}</p>
Expand Down Expand Up @@ -78,9 +78,9 @@
{% endcomment %}
{% paginate article.comments by 5 %}
{% comment %}
#comments is required, it is used as an anchor link by Shopify.
#Comments is required, it is used as an anchor link by Shopify.
{% endcomment %}
<div id="comments">
<div id="Comments">

{% if comment and comment.created_at %}
<p class="note form-success">
Expand Down Expand Up @@ -130,9 +130,9 @@
{% form 'new_comment', article %}

{% comment %}
#add-comment-title is used simply as an anchor link
#AddCommentTitle is used simply as an anchor link
{% endcomment %}
<h3 id="add-comment-title">{{ 'blogs.comments.title' | t }}</h3>
<h3 id="AddCommentTitle">{{ 'blogs.comments.title' | t }}</h3>

{{ form.errors | default_errors }}

Expand Down Expand Up @@ -161,13 +161,13 @@

{% if form.errors %}
<script>
window.location.hash = '#add-comment-title';
window.location.hash = '#AddCommentTitle';
</script>
{% endif %}

{% if form.posted_successfully? %}
<script>
window.location.hash = '#comments';
window.location.hash = '#Comments';
</script>
{% endif %}

Expand Down
2 changes: 1 addition & 1 deletion templates/blog.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
{% endcomment %}
{% if blog.comments_enabled? %}
<li>
<a href="{{ article.url }}#comments">
<a href="{{ article.url }}#Comments">
{{ 'blogs.comments.comments_with_count' | t: count: article.comments_count }}
</a>
</li>
Expand Down
11 changes: 6 additions & 5 deletions templates/cart.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,9 @@
<small>{{ item.variant.title }}</small>
{% endunless %}

{% comment %}
Optional, add the vendor
{% endcomment %}
<p>{{ item.vendor }}</p>
{% if settings.cart_vendor_enable %}
<p>{{ item.vendor }}</p>
{% endif %}

{% comment %}
Optional, loop through custom product line items if available
Expand All @@ -99,7 +98,9 @@
{% endfor %}
{% endif %}

<a href="/cart/change?line={{ forloop.index }}&amp;quantity=0" data-id="{{ item.id }}"><small>{{ 'cart.general.remove' | t }}</small></a>
<a href="/cart/change?line={{ forloop.index }}&amp;quantity=0" class="cart__remove" data-id="{{ item.id }}">
<small>{{ 'cart.general.remove' | t }}</small>
</a>
</div>

</div>
Expand Down
8 changes: 4 additions & 4 deletions templates/collection.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@
{% endcomment %}
{% if collection.description != blank %}
<header class="section-header">
<h1 class="section-header--title">{{ collection.title }}</h1>
<h1 class="section-header__title">{{ collection.title }}</h1>
<div class="rte rte--header">
{{ collection.description }}
</div>
</header>
<hr>
<div class="section-header">
<div class="section-header--right">
<div class="section-header__right">
{% include 'collection-sorting' %}
{% include 'collection-views' %}
</div>
</div>
{% else %}
<header class="section-header">
<h1 class="section-header--title section-header--left">{{ collection.title }}</h1>
<div class="section-header--right">
<h1 class="section-header__title section-header__left">{{ collection.title }}</h1>
<div class="section-header__right">
{% include 'collection-sorting' %}
{% include 'collection-views' %}
</div>
Expand Down
8 changes: 4 additions & 4 deletions templates/collection.list.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@
{% endcomment %}
{% if collection.description != blank %}
<header class="section-header">
<h1 class="section-header--title">{{ collection.title }}</h1>
<h1 class="section-header__title">{{ collection.title }}</h1>
<div class="rte rte--header">
{{ collection.description }}
</div>
</header>
<hr>
<div class="section-header">
<div class="section-header--right">
<div class="section-header__right">
{% include 'collection-sorting' %}
{% include 'collection-views' %}
</div>
</div>
{% else %}
<header class="section-header">
<h1 class="section-header--title section-header--left">{{ collection.title }}</h1>
<div class="section-header--right">
<h1 class="section-header__title section-header__left">{{ collection.title }}</h1>
<div class="section-header__right">
{% include 'collection-sorting' %}
{% include 'collection-views' %}
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/customers/addresses.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
{% layout settings.customer_layout %}

<header class="section-header">
<h1 class="section-header--left">{{ 'customer.account.title' | t }}</h1>
<div class="section-header--right">
<h1 class="section-header__left">{{ 'customer.account.title' | t }}</h1>
<div class="section-header__right">
<a href="#" class="btn" onclick="Shopify.CustomerAddress.toggleNewForm(); return false;">{{ 'customer.addresses.add_new' | t }}</a>
</div>
</header>
Expand Down
2 changes: 1 addition & 1 deletion templates/product.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@

// Add label if only one product option and it isn't 'Title'. Could be 'Size'.
{% if product.options.size == 1 and product.options.first != 'Title' %}
$('.selector-wrapper:eq(0)').prepend('<label>{{ product.options.first | escape }}</label>');
$('.selector-wrapper:eq(0)').prepend('<label for="productSelect-option-0">{{ product.options.first | escape }}</label>');
{% endif %}

// Hide selectors if we only have 1 variant and its title contains 'Default'.
Expand Down