diff --git a/customize.dist/src/less/cryptpad.less b/customize.dist/src/less/cryptpad.less index 6bcfc0863..54281255d 100644 --- a/customize.dist/src/less/cryptpad.less +++ b/customize.dist/src/less/cryptpad.less @@ -610,7 +610,7 @@ noscript { color: black; text-shadow: 1px 0 2px white, 0 1px 2px white, -1px 0 2px white, 0 -1px 2px white; z-index: 2; - font-size: 16px; + font-size: @main-font-size; font-weight: bold; } } diff --git a/customize.dist/src/less/mixins.less b/customize.dist/src/less/mixins.less index 207ddbd02..7de8d4244 100644 --- a/customize.dist/src/less/mixins.less +++ b/customize.dist/src/less/mixins.less @@ -1,3 +1,5 @@ +@import "/customize/src/less/variables.less"; + .fontface(@family, @src, @style: normal, @weight: 400, @fmt: 'truetype'){ @font-face { font-family: @family; @@ -123,8 +125,10 @@ padding: 5px 20px; margin: 15px 0; cursor: pointer; + height: @toolbar-line-height; + line-height: @toolbar-line-height - 10px; .fa { - width: 20px; + width: 25px; } &:hover { background: rgba(0,0,0,0.05); diff --git a/customize.dist/src/less/toolbar.less b/customize.dist/src/less/toolbar.less index cc1a1b18e..58fece5a2 100644 --- a/customize.dist/src/less/toolbar.less +++ b/customize.dist/src/less/toolbar.less @@ -57,7 +57,7 @@ } body .userlist-drawer { - font: normal normal normal 16px Arial,Helvetica,Tahoma,Verdana,Sans-Serif; + font: normal normal normal @main-font-size Arial,Helvetica,Tahoma,Verdana,Sans-Serif; min-width: 175px; width: 175px; display: block; @@ -96,7 +96,7 @@ body .userlist-drawer { } & > p { - font: normal normal normal 16px Arial,Helvetica,Tahoma,Verdana,Sans-Serif; + font: normal normal normal @main-font-size Arial,Helvetica,Tahoma,Verdana,Sans-Serif; margin: 0; padding: 0; display: block; @@ -145,7 +145,7 @@ body { } } .cryptpad-spinner, .cryptpad-state { - font-size: 16px; + font-size: @main-font-size; color: @color; } .cryptpad-limit { @@ -472,7 +472,7 @@ body .cryptpad-toolbar { } button, select, .rightside-element { - height: 32px; + height: @toolbar-line-height; box-sizing: border-box; padding: 3px 10px; margin: 0; @@ -582,7 +582,7 @@ body .cryptpad-toolbar { flex: auto; width: 100%; order: 10; - height: 32px; + height: @toolbar-line-height; line-height: initial; margin: 0; .hoverable { @@ -593,24 +593,24 @@ body .cryptpad-toolbar { display: inline-block; overflow: hidden; text-overflow: ellipsis; - font-size: 16px; - height: 32px; + font-size: @main-font-size; + height: @toolbar-line-height; box-sizing: border-box; line-height: 20px; } .pencilIcon, .saveIcon { box-sizing: border-box; - height: 32px; - line-height: 16px; + height: @toolbar-line-height; + line-height: @main-font-size; display: inline-block; .fa { - font-size: 16px; + font-size: @main-font-size; } } input { - height: 32px; - font-size: 16px; + height: @toolbar-line-height; + font-size: @main-font-size; flex: 1; max-width: none; } @@ -795,7 +795,7 @@ body .cryptpad-toolbar { vertical-align: top; } .cryptpad-upgrade { - height: 32px; + height: @toolbar-line-height; vertical-align: middle; cursor: pointer; } @@ -848,7 +848,7 @@ body .cryptpad-toolbar { } } .cryptpad-toolbar-leftside { - height: 32px; + height: @toolbar-line-height; &:empty { height: 0; } @@ -883,7 +883,7 @@ body .cryptpad-toolbar { } } .cryptpad-toolbar-rightside { - min-height: 32px; + min-height: @toolbar-line-height; overflow: hidden; &:empty { min-height: 0; @@ -903,7 +903,7 @@ body .cryptpad-toolbar { box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.2); position: absolute; right:0px; - margin-top: 32px; + margin-top: @toolbar-line-height; min-width: 50px; background: @dropdown-bg; display: flex; @@ -916,7 +916,7 @@ body .cryptpad-toolbar { &> span { box-sizing: border-box; min-width: 150px; - height: 32px; + height: @toolbar-line-height; border-radius: 0; border: 0; } diff --git a/customize.dist/src/less/variables.less b/customize.dist/src/less/variables.less index 40ce76bef..edc46d250 100644 --- a/customize.dist/src/less/variables.less +++ b/customize.dist/src/less/variables.less @@ -7,6 +7,8 @@ @old-base: #302B28; @old-fore: #fafafa; +@main-font-size: 16px; + @cp-green: #46E981; @cp-accent: lighten(@cp-green, 20%); @@ -73,7 +75,7 @@ // Dropdown -@dropdown-font: 16px -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; +@dropdown-font: @main-font-size -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; @dropdown-bg: #f9f9f9; @dropdown-color: black; @dropdown-bg-hover: #f1f1f1; @@ -131,3 +133,5 @@ -ms-user-select: none; user-select: none; } + +@toolbar-line-height: 32px; diff --git a/www/drive/file.less b/www/drive/file.less index b950da8db..7dcb8f9f9 100644 --- a/www/drive/file.less +++ b/www/drive/file.less @@ -37,7 +37,7 @@ html, body { padding: 0; margin: 0; position: relative; - font-size: 16px; + font-size: @main-font-size; overflow: auto; } @@ -93,8 +93,6 @@ div:focus { } .fa { - /*min-width: 17px;*/ - margin-right: 3px; font-family: FontAwesome; } @@ -111,17 +109,13 @@ li { user-select: none; } -.folder, .file { - margin-right: 5px; -} - .contextMenu { display: none; position: absolute; z-index: 500; li { padding: 0; - font-size: 16px; + font-size: @main-font-size; a { cursor: pointer; } @@ -164,7 +158,7 @@ span { #tree { - font-size: 16px; + font-size: @main-font-size; //border-right: 1px solid #ccc; box-sizing: border-box; background: @tree-bg; @@ -207,7 +201,7 @@ span { .leftsideCategory(); width: ~"calc(100% + 5px)"; margin: 0; - margin-bottom: -5px; + margin-bottom: -6px; display: inline-block; cursor: pointer; margin-left: -5px; @@ -272,7 +266,7 @@ span { border: 0; border-right: 1px solid lighten(@toolbar-drive-bg, 16%); //border-right: 0; - height: 32px; + height: @toolbar-line-height; padding: 0 5px; padding-left: 45px; &:focus { @@ -620,7 +614,7 @@ span { //flex-flow: row; z-index: 100; box-sizing: border-box; - height: 32px; + height: @toolbar-line-height; padding: 0; display: flex; flex-flow: row; @@ -649,20 +643,20 @@ span { margin: 0; } button { - height: 32px; + height: @toolbar-line-height; padding: 0 10px; border: none; border-radius: 0; box-sizing: border-box; background: transparent; - font-size: 17px; + font-size: @main-font-size; color: @toolbar-drive-color; transition: all 0.15s; .drawer { display: none; } .fa, span { - font-size: 17px; + font-size: @main-font-size; } &:hover { background: @toolbar-drive-bg; @@ -695,7 +689,7 @@ span { } .buttonTitle { display: inline-flex; - height: 32px; + height: @toolbar-line-height; align-items: center; span:not(.fa) { line-height: 23px; @@ -727,8 +721,8 @@ span { .path { flex: 1; width: 100%; - height: 32px; - line-height: 32px; + height: @toolbar-line-height; + line-height: @toolbar-line-height; cursor: default; width: auto; overflow: hidden; @@ -738,9 +732,9 @@ span { text-align: left; .element { display: inline-block; - height: 32px; - line-height: 32px; - font-size: 17px; + height: @toolbar-line-height; + line-height: @toolbar-line-height; + font-size: @main-font-size; padding: 0 5px; border: 0; background: darken(@toolbar-drive-bg, 10%);