From 9602a52801cca01d2e64058f6d4be330d5f75c42 Mon Sep 17 00:00:00 2001 From: Simon Busborg Date: Wed, 22 Jun 2016 13:52:49 +0200 Subject: [PATCH] added better utility for flexbox and changed classes in views --- .../src/less/utilities/umb-utility_flex.less | 55 +++++++++++++------ .../less/utilities/umb-utility_widths.less | 23 ++++++++ .../views/packager/views/install-local.html | 4 +- .../src/views/packager/views/installed.html | 4 +- .../src/views/packager/views/repo.html | 10 ++-- 5 files changed, 70 insertions(+), 26 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/utilities/umb-utility_flex.less b/src/Umbraco.Web.UI.Client/src/less/utilities/umb-utility_flex.less index 747b4047d0..73f58dde8d 100644 --- a/src/Umbraco.Web.UI.Client/src/less/utilities/umb-utility_flex.less +++ b/src/Umbraco.Web.UI.Client/src/less/utilities/umb-utility_flex.less @@ -1,20 +1,39 @@ -// Flex -.flex { - display: flex; +.flex { display: flex } +.flex-inline { display: flex-inline } + +.flex-column { flex-direction: column; } +.flex-wrap { flex-wrap: wrap; } + +.items-start { align-items: flex-start; } +.items-end { align-items: flex-end; } +.items-center { align-items: center; } +.items-baseline { align-items: baseline; } +.items-stretch { align-items: stretch; } + +.self-start { align-self: flex-start; } +.self-end { align-self: flex-end; } +.self-center { align-self: center; } +.self-baseline { align-self: baseline; } +.self-stretch { align-self: stretch; } + +.justify-start { justify-content: flex-start; } +.justify-end { justify-content: flex-end; } +.justify-center { justify-content: center; } +.justify-between { justify-content: space-between; } +.justify-around { justify-content: space-around; } + +.content-start { align-content: flex-start; } +.content-end { align-content: flex-end; } +.content-center { align-content: center; } +.content-between { align-content: space-between; } +.content-around { align-content: space-around; } +.content-stretch { align-content: stretch; } + +/* 1. Fix for Chrome 44 bug. https://code.google.com/p/chromium/issues/detail?id=506893 */ +.flex-auto { + flex: 1 1 auto; + min-width: 0; /* 1 */ + min-height: 0; /* 1 */ } -.flex-inline { - display: inline-flex; -} - -.flex-direction-column { - flex-direction: column; -} - -.flex-justify-center { - justify-content: center; -} - -.flex-align-center { - align-items: center; -} +.flex-none { flex: none; } diff --git a/src/Umbraco.Web.UI.Client/src/less/utilities/umb-utility_widths.less b/src/Umbraco.Web.UI.Client/src/less/utilities/umb-utility_widths.less index 99ae7da380..c9fbba3798 100644 --- a/src/Umbraco.Web.UI.Client/src/less/utilities/umb-utility_widths.less +++ b/src/Umbraco.Web.UI.Client/src/less/utilities/umb-utility_widths.less @@ -1,4 +1,27 @@ // Widths +.width-1 { width: calc(1/12 * 100%); } +.width-2 { width: calc(2/12 * 100%); } +.width-3 { width: calc(3/12 * 100%); } +.width-4 { width: calc(4/12 * 100%); } +.width-5 { width: calc(5/12 * 100%); } +.width-6 { width: calc(6/12 * 100%); } +.width-7 { width: calc(7/12 * 100%); } +.width-8 { width: calc(8/12 * 100%); } +.width-9 { width: calc(9/12 * 100%); } +.width-10 { width: calc(10/12 * 100%); } +.width-11 { width: calc(11/12 * 100%); } +.width-12 { width: 100%; } + .width-100 { width: 100%; } + +.width { + float: left; + box-sizing: border-box; +} + +.width-right { + float: right; + box-sizing: border-box; +} diff --git a/src/Umbraco.Web.UI.Client/src/views/packager/views/install-local.html b/src/Umbraco.Web.UI.Client/src/views/packager/views/install-local.html index 25901d5e75..64e37713e9 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packager/views/install-local.html +++ b/src/Umbraco.Web.UI.Client/src/views/packager/views/install-local.html @@ -82,7 +82,7 @@ -
+
-
+
- -
+ +

We couldn't find anything for '{{ vm.searchQuery }}'

Please try searching for another package or browse through the categories.

+ +
@@ -285,7 +287,7 @@
-
+