mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 10:57:04 +08:00
FEATURE: Add "smallest" option to user text size preferences
This commit is contained in:
parent
44aaf4415d
commit
66257ca8b6
|
@ -21,7 +21,7 @@ const USER_HOMES = {
|
|||
5: "top"
|
||||
};
|
||||
|
||||
const TEXT_SIZES = ["smaller", "normal", "larger", "largest"];
|
||||
const TEXT_SIZES = ["smallest", "smaller", "normal", "larger", "largest"];
|
||||
const TITLE_COUNT_MODES = ["notifications", "contextual"];
|
||||
|
||||
export default Controller.extend({
|
||||
|
|
|
@ -14,6 +14,10 @@ html {
|
|||
overflow-y: scroll;
|
||||
direction: ltr;
|
||||
|
||||
&.text-size-smallest {
|
||||
font-size: $base-font-size-smallest;
|
||||
}
|
||||
|
||||
&.text-size-smaller {
|
||||
font-size: $base-font-size-smaller;
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ $bronze: #cd7f32 !default;
|
|||
// Fonts
|
||||
// --------------------------------------------------
|
||||
|
||||
$base-font-size-smallest: 0.815em !default; // eq. to 13px
|
||||
$base-font-size-smaller: 0.875em !default; // eq. to 14px
|
||||
$base-font-size: 0.938em !default; // eq. to 15px
|
||||
$base-font-size-larger: 1.063em !default; // eq. to 17px
|
||||
|
|
|
@ -28,7 +28,7 @@ class UserOption < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def self.text_sizes
|
||||
@text_sizes ||= Enum.new(normal: 0, larger: 1, largest: 2, smaller: 3)
|
||||
@text_sizes ||= Enum.new(normal: 0, larger: 1, largest: 2, smaller: 3, smallest: 4)
|
||||
end
|
||||
|
||||
def self.title_count_modes
|
||||
|
|
|
@ -1216,6 +1216,7 @@ en:
|
|||
|
||||
text_size:
|
||||
title: "Text Size"
|
||||
smallest: "Smallest"
|
||||
smaller: "Smaller"
|
||||
normal: "Normal"
|
||||
larger: "Larger"
|
||||
|
|
|
@ -142,6 +142,7 @@ componentTest("valueAttribute (deprecated)", {
|
|||
this.set("value", "normal");
|
||||
|
||||
const content = [
|
||||
{ name: "Smallest", value: "smallest" },
|
||||
{ name: "Smaller", value: "smaller" },
|
||||
{ name: "Normal", value: "normal" },
|
||||
{ name: "Larger", value: "larger" },
|
||||
|
|
Loading…
Reference in New Issue
Block a user