From 8799b5497c97286ab5a2fb4562d9cf5ac976c18d Mon Sep 17 00:00:00 2001 From: REJack Date: Tue, 17 Sep 2019 10:42:32 +0200 Subject: [PATCH] some little text-sm fixes - button text size - dropdown text size - dropdown toggle icon alignment - top-nav brand image margin - added docs part --- build/scss/_buttons.scss | 4 ++++ build/scss/_dropdown.scss | 10 ++++++++++ build/scss/_layout.scss | 5 +++++ docs/components/miscellaneous.md | 13 +++++++++++++ 4 files changed, 32 insertions(+) diff --git a/build/scss/_buttons.scss b/build/scss/_buttons.scss index 87914e330..18037ffbf 100644 --- a/build/scss/_buttons.scss +++ b/build/scss/_buttons.scss @@ -30,6 +30,10 @@ top: 0; } } + + .text-sm & { + font-size: $font-size-sm !important; + } } // Button color variations diff --git a/build/scss/_dropdown.scss b/build/scss/_dropdown.scss index 537d034db..d19c1c27b 100644 --- a/build/scss/_dropdown.scss +++ b/build/scss/_dropdown.scss @@ -12,6 +12,16 @@ // } //} +.text-sm { + .dropdown-menu { + font-size: $font-size-sm !important; + } + + .dropdown-toggle::after { + vertical-align: .2rem + } +} + .dropdown-item-title { font-size: $font-size-base; margin: 0; diff --git a/build/scss/_layout.scss b/build/scss/_layout.scss index 24cb3d51c..4c91b5266 100644 --- a/build/scss/_layout.scss +++ b/build/scss/_layout.scss @@ -352,6 +352,11 @@ body, .layout-top-nav & { margin-left: 0; + & .text-sm { + .brand-image { + margin-top: -.5rem; + } + } & .main-sidebar { bottom: inherit; diff --git a/docs/components/miscellaneous.md b/docs/components/miscellaneous.md index 13cb6ae68..e68753633 100644 --- a/docs/components/miscellaneous.md +++ b/docs/components/miscellaneous.md @@ -5,6 +5,19 @@ title: Miscellaneous AdminLTE has smaller custom classes that not related to other components are listed here. +### Text Size +You can change the font sizes with adding to any element `.text-*` e.g. (`.text-sm`). +- `.text-xs` (0.75rem) +- `.text-sm` (0.875rem) +- `.text-md` (1rem) +- `.text-lg` (1.25rem) +- `.text-xl` (2rem) + +> ##### Tip! +> You can also add `.text-sm` to `body`, with this you get a complete smaller font on the UI or can you add `.text-sm` to `.main-sidebar` or `.main-header` & `.brand-link`. +{: .quote-info} + + ### Dropdown Menu Large You can add the `.dropdown-menu-lg` to `.dropdown-menu` for a bigger dropdown menu.