From: Marcel Werk Date: Wed, 18 Apr 2012 14:05:19 +0000 (+0200) Subject: Small less optimizations X-Git-Tag: 2.0.0_Beta_1~1150 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=50d8fb15e776c5c9b7f294a33cbdd8ba6965ac42;p=GitHub%2FWoltLab%2FWCF.git Small less optimizations --- diff --git a/wcfsetup/install/files/style/alerts.less b/wcfsetup/install/files/style/alerts.less index 371cadfdcf..2da37f68c9 100644 --- a/wcfsetup/install/files/style/alerts.less +++ b/wcfsetup/install/files/style/alerts.less @@ -5,13 +5,13 @@ .error, .success, .warning { - border-radius: @wcfContainerBorderRadius; font-weight: bold; line-height: 1.5; margin-top: @wcfGapMedium; padding: @wcfGapSmall @wcfGapMedium @wcfGapSmall 50px; position: relative; + .borderRadius(); .boxShadowNative(~"0 1px 2px rgba(0, 0, 0, .5), inset 0 0 1px rgba(0, 0, 0, .2)"); &:after { @@ -92,10 +92,8 @@ } } -/* Inline Errors */ - +/* inline errors */ .innerError { - border-radius: @wcfContainerBorderRadius; clear: both; color: @wcfErrorColor; display: table !important; @@ -104,6 +102,7 @@ padding: 2px 10px; position: relative; /* Firefox support (from version 10 on) is buggy */ + .borderRadius(); .boxShadowNative(~"0 1px 2px rgba(0, 0, 0, .5), inset 0 0 1px rgba(0, 0, 0, .2)"); .linearGradient(@wcfErrorBackgroundColor2, @wcfErrorBackgroundColor, @wcfErrorBackgroundColor2); .textShadow(@wcfErrorBackgroundColor2); diff --git a/wcfsetup/install/files/style/attachment.less b/wcfsetup/install/files/style/attachment.less index de104e58a6..895ee07897 100644 --- a/wcfsetup/install/files/style/attachment.less +++ b/wcfsetup/install/files/style/attachment.less @@ -85,13 +85,12 @@ > li { width: 33%; float: left; - //background-color: red; - //position: relative; - + > .thumbnail { width: 48px; height: 48px; - border-radius: 5px; + + .borderRadius(); } hgroup { diff --git a/wcfsetup/install/files/style/breadcrumbs.less b/wcfsetup/install/files/style/breadcrumbs.less index 685446d2aa..77f8442391 100644 --- a/wcfsetup/install/files/style/breadcrumbs.less +++ b/wcfsetup/install/files/style/breadcrumbs.less @@ -5,13 +5,14 @@ .breadcrumbs { background-color: @wcfContentBackgroundColor; border: 1px solid @wcfContainerBorderColor; - border-radius: @wcfContainerBorderRadius; box-sizing: border-box; display: block; overflow: hidden; position: relative; text-align: left; + .borderRadius(); + > ul { > li { float: left; diff --git a/wcfsetup/install/files/style/layout.less b/wcfsetup/install/files/style/layout.less index 29f4c23537..9c45c2c190 100644 --- a/wcfsetup/install/files/style/layout.less +++ b/wcfsetup/install/files/style/layout.less @@ -75,7 +75,8 @@ img { .container { background-color: @wcfContainerBackgroundColor; border: 1px solid @wcfContainerBorderColor; - border-radius: @wcfContainerBorderRadius; + + .borderRadius(); } .containerPadding { diff --git a/wcfsetup/install/files/style/sortable.less b/wcfsetup/install/files/style/sortable.less index 5d5df3a54a..cfd9ae6dd5 100644 --- a/wcfsetup/install/files/style/sortable.less +++ b/wcfsetup/install/files/style/sortable.less @@ -2,10 +2,11 @@ /* todo */ background-color: @wcfWarningBackgroundColor; border: 1px solid @wcfWarningBackgroundColor2; - border-radius: 5px; color: @wcfWarningColor; margin: 3px 0; padding: 4px; + + .borderRadius(); } .sortablePlaceholder.sortableInvalidTarget { diff --git a/wcfsetup/install/files/style/tabs.less b/wcfsetup/install/files/style/tabs.less index 3cdd6d3cb0..ef9e53afdb 100644 --- a/wcfsetup/install/files/style/tabs.less +++ b/wcfsetup/install/files/style/tabs.less @@ -7,7 +7,7 @@ margin-top: @wcfGapMedium; padding: 0 10px; position: relative; - text-align: center; + text-align: left; ul { background-color: @wcfContainerAccentBackgroundColor; diff --git a/wcfsetup/install/files/style/tabular.less b/wcfsetup/install/files/style/tabular.less index 3982123524..db5302beb0 100644 --- a/wcfsetup/install/files/style/tabular.less +++ b/wcfsetup/install/files/style/tabular.less @@ -11,7 +11,7 @@ padding: 5px 7px; h1 { - font-size: 120%; + font-size: @wcfTitleFontSize; font-weight: bold; .textShadow(@wcfTabularBoxBackgroundColor); @@ -30,11 +30,11 @@ .tabularBox:not(.tabularBoxTitle) .table { thead tr:first-child th { &:first-child { - .borderRadius(@wcfContainerBorderRadius - 1, 0, 0, 0); + .borderRadius(@wcfContainerBorderRadius - 2, 0, 0, 0); } &:last-child { - .borderRadius(0, @wcfContainerBorderRadius - 1, 0, 0); + .borderRadius(0, @wcfContainerBorderRadius - 2, 0, 0); } } } @@ -174,11 +174,11 @@ .tabularBox .table { tbody tr:last-child td { &:first-child { - .borderRadius(0, 0, 0, @wcfContainerBorderRadius - 1); + .borderRadius(0, 0, 0, @wcfContainerBorderRadius - 2); } &:last-child { - .borderRadius(0, 0, @wcfContainerBorderRadius - 1, 0); + .borderRadius(0, 0, @wcfContainerBorderRadius - 2, 0); } } } diff --git a/wcfsetup/install/files/style/tooltip.less b/wcfsetup/install/files/style/tooltip.less index b8e85a2820..47ad60af31 100644 --- a/wcfsetup/install/files/style/tooltip.less +++ b/wcfsetup/install/files/style/tooltip.less @@ -1,14 +1,8 @@ /* ############## Balloon Tooltips ############## */ /* Globals */ - -.jsTooltip { /* Do not change this style */ - cursor: pointer; -} - .balloonTooltip { background-color: @wcfTooltipBackgroundColor; - border-radius: @wcfContainerBorderRadius; color: @wcfTooltipColor; font-size: .85em; max-width: 300px; @@ -16,6 +10,7 @@ position: absolute; z-index: 800; + .borderRadius(); .boxShadow(0, 3px, rgba(0, 0, 0, .3), 7px); .pointer { diff --git a/wcfsetup/install/files/style/variables.less b/wcfsetup/install/files/style/variables.less index 2cafa0ff68..4ed1ae15d2 100644 --- a/wcfsetup/install/files/style/variables.less +++ b/wcfsetup/install/files/style/variables.less @@ -13,7 +13,7 @@ @wcfContainerAccentBackgroundColor: rgba(241, 245, 250, 1); // light variantion of the container bg color @wcfContainerHoverBackgroundColor: rgba(216, 231, 245, 1); // bg color for hover effects @wcfContainerBorderColor: #bcd; // border color for containers -@wcfContainerBorderRadius: 5px; // border radius +@wcfContainerBorderRadius: 6px; // border radius /* ### box header (table header) ### */ @wcfTabularBoxBackgroundColor: #369; // bg color diff --git a/wcfsetup/install/files/style/wbb.less b/wcfsetup/install/files/style/wbb.less index 2a1c1bfc2d..d3f162dca3 100644 --- a/wcfsetup/install/files/style/wbb.less +++ b/wcfsetup/install/files/style/wbb.less @@ -51,9 +51,9 @@ > div { background-color: @wcfContentBackgroundColor; padding: @wcfGapSmall; - border-radius: @wcfContainerBorderRadius; margin-right: @wcfGapSmall; + .borderRadius(); .boxShadowNative(~"inset 0 1px 1px rgba(0, 0, 0, .1)"); } @@ -286,7 +286,6 @@ /* ############## Post Preview ############## */ .wbbPostPreview { background-color: @wcfTooltipBackgroundColor; - border-radius: @wcfContainerBorderRadius; color: @wcfTooltipColor; margin-bottom: 10px; max-width: 450px; @@ -295,6 +294,7 @@ position: absolute; z-index: 320; + .borderRadius(); .boxShadow(0, 3px, rgba(0, 0, 0, .3), 7px); .pointer {