From 44b9031d14a316b55e1250efb749dd9e3f1bdddf Mon Sep 17 00:00:00 2001 From: Murphy Stroppa Date: Thu, 3 Mar 2016 15:41:16 -0800 Subject: [PATCH 1/3] Move header texts out of 16 column skeleton Use a flexbox to align the content in the content-header. This is semantically better than using a table display for non-tabular data and is a move away from the 16 column skeleton that we will be eliminating. --- .../spree/backend/shared/_layout.scss | 19 +++++++++----- .../admin/shared/_content_header.html.erb | 26 +++++++------------ 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/backend/app/assets/stylesheets/spree/backend/shared/_layout.scss b/backend/app/assets/stylesheets/spree/backend/shared/_layout.scss index ca7a1122995..432aad5e2fe 100644 --- a/backend/app/assets/stylesheets/spree/backend/shared/_layout.scss +++ b/backend/app/assets/stylesheets/spree/backend/shared/_layout.scss @@ -103,7 +103,9 @@ body { } #content-header { - padding: 15px 0; + @include display(flex); + @include align-items(center); + padding: 15px 14px; background-color: very-light($color-3, 4); border-bottom: 1px solid $color-border; @@ -113,12 +115,15 @@ body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } - .page-actions { - text-align: right; - line-height: 38px; - form { - display: inline-block; - } +} + +.header-actions { + @include flex-grow(1); + text-align: right; + line-height: 38px; + + form { + display: inline-block; } } diff --git a/backend/app/views/spree/admin/shared/_content_header.html.erb b/backend/app/views/spree/admin/shared/_content_header.html.erb index 0e17e1e7e5e..98e83a20ba2 100644 --- a/backend/app/views/spree/admin/shared/_content_header.html.erb +++ b/backend/app/views/spree/admin/shared/_content_header.html.erb @@ -1,23 +1,15 @@ <% if content_for?(:page_title) || content_for?(:page_actions) %>
-
-
-
- <% if content_for?(:page_title) %> -
-

<%= yield :page_title %>

-
- <% end %> + <% if content_for?(:page_title) %> +

<%= yield :page_title %>

+ <% end %> - <% if content_for?(:page_actions) %> -
-
    - <%= yield :page_actions %> -
-
- <% end %> -
+ <% if content_for?(:page_actions) %> +
+
    + <%= yield :page_actions %> +
-
+ <% end %>
<% end %> From 4d9bc414e1a75a11115b5ddef4273a477acd5aaa Mon Sep 17 00:00:00 2001 From: Murphy Stroppa Date: Fri, 4 Mar 2016 14:59:32 -0800 Subject: [PATCH 2/3] Remove toolbar div This div is an extraneous element to the page polluting the markup so it will be removed. --- .../app/views/spree/admin/shared/_content_header.html.erb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/backend/app/views/spree/admin/shared/_content_header.html.erb b/backend/app/views/spree/admin/shared/_content_header.html.erb index 98e83a20ba2..89be55d8af4 100644 --- a/backend/app/views/spree/admin/shared/_content_header.html.erb +++ b/backend/app/views/spree/admin/shared/_content_header.html.erb @@ -5,11 +5,9 @@ <% end %> <% if content_for?(:page_actions) %> -
-
    - <%= yield :page_actions %> -
-
+
    + <%= yield :page_actions %> +
<% end %>
<% end %> From 94678538451de6e0f9c34032af54485254599ecb Mon Sep 17 00:00:00 2001 From: Murphy Stroppa Date: Fri, 4 Mar 2016 15:17:40 -0800 Subject: [PATCH 3/3] Remove yield page_title_classes This is not touched anywhere in the code base and should be removed. --- backend/app/views/spree/admin/shared/_content_header.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/views/spree/admin/shared/_content_header.html.erb b/backend/app/views/spree/admin/shared/_content_header.html.erb index 89be55d8af4..16dcf6942f8 100644 --- a/backend/app/views/spree/admin/shared/_content_header.html.erb +++ b/backend/app/views/spree/admin/shared/_content_header.html.erb @@ -1,7 +1,7 @@ <% if content_for?(:page_title) || content_for?(:page_actions) %>
<% if content_for?(:page_title) %> -

<%= yield :page_title %>

+

<%= yield :page_title %>

<% end %> <% if content_for?(:page_actions) %>