mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-05 23:07:31 +09:00
Bug 1325922: [DateTimePicker] Add arrows svg file and style month-year button for date picker
This commit is contained in:
parent
f4e1313a58
commit
a13a3afc1b
7 changed files with 101 additions and 20 deletions
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
--border: 0.1rem solid #D6D6D6;
|
||||
--border-radius: 0.3rem;
|
||||
--border-active-color: #B1B1B1;
|
||||
|
||||
--font-color: #191919;
|
||||
--fill-color: #EBEBEB;
|
||||
|
|
@ -26,6 +27,7 @@
|
|||
--button-font-color: #858585;
|
||||
--button-font-color-hover: #4D4D4D;
|
||||
--button-font-color-active: #191919;
|
||||
--button-fill-color-active: #D4D4D4;
|
||||
|
||||
--weekday-font-color: #6C6C6C;
|
||||
--weekday-outside-font-color: #6C6C6C;
|
||||
|
|
@ -46,6 +48,12 @@ body {
|
|||
font-size: var(--font-size-default);
|
||||
}
|
||||
|
||||
button {
|
||||
-moz-appearance: none;
|
||||
background: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.nav {
|
||||
display: flex;
|
||||
width: var(--calendar-width);
|
||||
|
|
@ -54,15 +62,29 @@ body {
|
|||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.nav button {
|
||||
-moz-appearance: none;
|
||||
background: none;
|
||||
border: none;
|
||||
.nav > button {
|
||||
width: 3rem;
|
||||
height: var(--date-picker-item-height);
|
||||
background-color: var(--button-font-color);
|
||||
}
|
||||
|
||||
.month-year {
|
||||
.nav > button:hover {
|
||||
background-color: var(--button-font-color-hover);
|
||||
}
|
||||
|
||||
.nav > button.active {
|
||||
background-color: var(--button-font-color-active);
|
||||
}
|
||||
|
||||
.nav > button.left {
|
||||
background: url("chrome://global/skin/icons/calendar-arrows.svg#left") no-repeat 50% 50%;
|
||||
}
|
||||
|
||||
.nav > button.right {
|
||||
background: url("chrome://global/skin/icons/calendar-arrows.svg#right") no-repeat 50% 50%;
|
||||
}
|
||||
|
||||
.month-year-container {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
|
@ -74,6 +96,35 @@ body {
|
|||
z-index: 10;
|
||||
}
|
||||
|
||||
button.month-year {
|
||||
font-size: 1.3rem;
|
||||
border: var(--border);
|
||||
border-radius: 0.3rem;
|
||||
padding: 0.2rem 2.6rem 0.2rem 1.2rem;
|
||||
}
|
||||
|
||||
button.month-year:hover {
|
||||
background: var(--fill-color);
|
||||
}
|
||||
|
||||
button.month-year.active {
|
||||
border-color: var(--border-active-color);
|
||||
background: var(--button-fill-color-active);
|
||||
}
|
||||
|
||||
button.month-year::after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
width: 2.6rem;
|
||||
height: 1.6rem;
|
||||
background: url("chrome://global/skin/icons/spinner-arrows.svg#down") no-repeat 50% 50%;
|
||||
background-color: var(--button-font-color);
|
||||
}
|
||||
|
||||
button.month-year.active::after {
|
||||
background: url("chrome://global/skin/icons/spinner-arrows.svg#up") no-repeat 50% 50%;
|
||||
}
|
||||
|
||||
.month-year-view {
|
||||
position: absolute;
|
||||
z-index: 5;
|
||||
|
|
@ -187,9 +238,6 @@ body {
|
|||
}
|
||||
|
||||
.spinner-container > button {
|
||||
-moz-appearance: none;
|
||||
border: none;
|
||||
background: none;
|
||||
background-color: var(--button-font-color);
|
||||
height: var(--spinner-button-height);
|
||||
}
|
||||
|
|
|
|||
13
toolkit/themes/shared/icons/calendar-arrows.svg
Normal file
13
toolkit/themes/shared/icons/calendar-arrows.svg
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14">
|
||||
<style>
|
||||
path:not(:target) {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<path id="right" d="M4.8 14L3 12.3 8.5 7 3 1.7 4.8 0 12 7"/>
|
||||
<path id="left" d="M9.2 0L11 1.7 5.5 7 11 12.3 9.2 14 2 7"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 540 B |
|
|
@ -23,6 +23,7 @@ toolkit.jar:
|
|||
skin/classic/global/config.css (../../shared/config.css)
|
||||
skin/classic/global/datetimeinputpickers.css (../../shared/datetimeinputpickers.css)
|
||||
skin/classic/global/datetimepopup.css (../../shared/datetimepopup.css)
|
||||
skin/classic/global/icons/calendar-arrows.svg (../../shared/icons/calendar-arrows.svg)
|
||||
skin/classic/global/icons/find-arrows.svg (../../shared/icons/find-arrows.svg)
|
||||
skin/classic/global/icons/info.svg (../../shared/incontent-icons/info.svg)
|
||||
skin/classic/global/icons/input-clear.svg (../../shared/icons/input-clear.svg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue