Просмотр исходного кода

ref(less): Move small things to misc.less (#39066)

Evan Purkhiser 2 лет назад
Родитель
Сommit
973da2194f

+ 0 - 11
static/less/icon-arrow.less

@@ -1,11 +0,0 @@
-/**
- * Icons
- * ============================================================================
- */
-
-.icon-arrow-right,
-.icon-arrow-left {
-  font-size: 16px !important;
-  position: relative;
-  top: 2px;
-}

+ 100 - 0
static/less/misc.less

@@ -1,3 +1,16 @@
+.icon-arrow-right,
+.icon-arrow-left {
+  font-size: 16px !important;
+  position: relative;
+  top: 2px;
+}
+
+.page-header {
+  padding-bottom: ((@line-height-computed / 2) - 1);
+  margin: 0 0 20px;
+  border-bottom: 1px solid @trim;
+}
+
 .truncate {
   max-width: 100%;
   display: block;
@@ -5,3 +18,90 @@
   text-overflow: ellipsis;
   white-space: nowrap;
 }
+
+// Alignment
+.text-left {
+  text-align: left;
+}
+.text-right {
+  text-align: right;
+}
+.text-center {
+  text-align: center;
+}
+.text-justify {
+  text-align: justify;
+}
+.text-nowrap {
+  white-space: nowrap;
+}
+
+.align-left {
+  text-align: left;
+  justify-content: flex-start;
+}
+
+.align-center {
+  text-align: center;
+  justify-content: center;
+}
+
+.align-right {
+  text-align: right;
+  justify-content: flex-end;
+}
+
+@spacer-x: 20px;
+@spacer-y: 20px;
+
+// Margin
+
+.m-b-0 {
+  margin-bottom: 0 !important;
+}
+.m-t-1 {
+  margin-top: @spacer-y !important;
+}
+.m-b-1 {
+  margin-bottom: @spacer-y !important;
+}
+.m-b-2 {
+  margin-bottom: (@spacer-y * 1.5) !important;
+}
+
+// Padding
+
+.p-a-0 {
+  padding: 0 0 !important;
+}
+.p-t-0 {
+  padding-top: 0 !important;
+}
+.p-a-1 {
+  padding: @spacer-y @spacer-x !important;
+}
+.p-t-1 {
+  padding-top: @spacer-y !important;
+}
+.p-b-1 {
+  padding-bottom: @spacer-y !important;
+}
+.p-t-2 {
+  padding-top: (@spacer-y * 1.5) !important;
+}
+.p-y-2 {
+  padding-top: (@spacer-y * 1.5) !important;
+  padding-bottom: (@spacer-y * 1.5) !important;
+}
+
+// Clear
+
+.c-b {
+  clear: both;
+}
+.c-l {
+  clear: left;
+}
+.c-r {
+  clear: right;
+}

+ 0 - 9
static/less/page-header.less

@@ -1,9 +0,0 @@
-/**
-* Page header
-* ============================================================================
-*/
-.page-header {
-  padding-bottom: ((@line-height-computed / 2) - 1);
-  margin: 0 0 20px;
-  border-bottom: 1px solid @trim;
-}

+ 0 - 4
static/less/sentry.less

@@ -10,9 +10,6 @@
 @import url('./shared/alerts.less');
 @import url('./shared/panel.less');
 @import url('./shared/forms.less');
-@import url('./icon-arrow.less');
-@import url('./text-align.less');
-@import url('./page-header.less');
 
 // App components
 @import url('./shared-components.less');
@@ -27,5 +24,4 @@
 @import url('./auth.less');
 @import url('./group-detail.less');
 @import url('./releases.less');
-@import url('./spacing.less');
 @import url('./stream.less');

+ 0 - 64
static/less/spacing.less

@@ -1,64 +0,0 @@
-// Shorthand margin and padding utility classes from Bootstrap v4-dev
-//
-// <p class="m-b-0">I am a paragraph that needs no bottom margin</p>
-// The classes are named using the format: {property}-{sides}-{size}
-// TODO: Remove once we upgrade to Bootstrap 4
-//
-// Copyright (c) 2011-2016 Twitter, Inc.
-
-// Variables
-
-@spacer-x: 20px;
-@spacer-y: 20px;
-
-// Margin
-
-.m-b-0 {
-  margin-bottom: 0 !important;
-}
-.m-t-1 {
-  margin-top: @spacer-y !important;
-}
-.m-b-1 {
-  margin-bottom: @spacer-y !important;
-}
-.m-b-2 {
-  margin-bottom: (@spacer-y * 1.5) !important;
-}
-
-// Padding
-
-.p-a-0 {
-  padding: 0 0 !important;
-}
-.p-t-0 {
-  padding-top: 0 !important;
-}
-.p-a-1 {
-  padding: @spacer-y @spacer-x !important;
-}
-.p-t-1 {
-  padding-top: @spacer-y !important;
-}
-.p-b-1 {
-  padding-bottom: @spacer-y !important;
-}
-.p-t-2 {
-  padding-top: (@spacer-y * 1.5) !important;
-}
-.p-y-2 {
-  padding-top: (@spacer-y * 1.5) !important;
-  padding-bottom: (@spacer-y * 1.5) !important;
-}
-
-// Clear
-
-.c-b {
-  clear: both;
-}
-.c-l {
-  clear: left;
-}
-.c-r {
-  clear: right;
-}

+ 0 - 31
static/less/text-align.less

@@ -1,31 +0,0 @@
-// Alignment
-.text-left {
-  text-align: left;
-}
-.text-right {
-  text-align: right;
-}
-.text-center {
-  text-align: center;
-}
-.text-justify {
-  text-align: justify;
-}
-.text-nowrap {
-  white-space: nowrap;
-}
-
-.align-left {
-  text-align: left;
-  justify-content: flex-start;
-}
-
-.align-center {
-  text-align: center;
-  justify-content: center;
-}
-
-.align-right {
-  text-align: right;
-  justify-content: flex-end;
-}