Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 78f8eea

Browse files
committed
feat(calendar): change coors to be in terms of the theme
1 parent 13396cc commit 78f8eea

File tree

4 files changed

+27
-19
lines changed

4 files changed

+27
-19
lines changed
Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,36 @@
11
// Theme styles for mdCalendar.
22

3+
.md-calendar {
4+
color: '{{foreground-2}}';
5+
6+
tr:last-child td {
7+
border-bottom-color: '{{background-200}}';
8+
}
9+
}
10+
311
.md-calendar-day-header {
4-
background-color: #eeeeee; // grey-200
5-
color: #616161; // need spec; currently grey-700
12+
background-color: '{{background-200}}'; // grey-200
13+
color: '{{foreground-2}}'; // grey-700
614
}
715

816
.md-calendar-date.md-calendar-date-today {
9-
color: #2196f3; // blue-500
17+
color: '{{primary-500}}'; // blue-500
1018
}
1119

1220
.md-calendar-date:focus {
1321
.md-calendar-date-selection-indicator {
14-
background-color: #e0e0e0; // grey-300
22+
background-color: '{{background-300}}'; // grey-300
1523
}
1624
}
1725

1826
.md-calendar-date-selection-indicator:hover {
19-
background-color: #e0e0e0; // grey-300
27+
background-color: '{{background-300}}'; // grey-300
2028
}
2129

2230
// Selected style goes after hover and focus so that it takes priority.
2331
.md-calendar-date.md-calendar-selected-date {
2432
.md-calendar-date-selection-indicator {
25-
background-color: #2196f3; // blue-500
26-
color: white; // ?
33+
background-color: '{{primary-500}}'; // blue-500
34+
color: '{{primary-contrast}}'; // SHOULD BE WHITE (ish)
2735
}
2836
}

src/components/calendar/calendar.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@
1717
// TODO(jelbourn): read-only state.
1818
// TODO(jelbourn): Date "isComplete" logic
1919
// TODO(jelbourn): Apple + up / down == PgDown and PgUp
20-
// TODO(jelbourn): Documentation
21-
// TODO(jelbourn): Demo that uses moment.js
2220
// TODO(jelbourn): Fix NVDA stealing key presses (IE) ???
2321

24-
// FUTURE VERSION
25-
// TODO(jelbourn): Animated month transition on ng-model change.
26-
// TODO(jelbourn): Scroll snapping
27-
// TODO(jelbourn): Month headers stick to top when scrolling
22+
// POST RELEASE
23+
// TODO(jelbourn): Animated month transition on ng-model change (virtual-repeat)
24+
// TODO(jelbourn): Scroll snapping (virtual repeat)
25+
// TODO(jelbourn): Remove superfluous row from short months (virtual-repeat)
26+
// TODO(jelbourn): Month headers stick to top when scrolling.
2827
// TODO(jelbourn): Previous month opacity is lowered when partially scrolled out of view.
2928
// TODO(jelbourn): Support md-calendar standalone on a page (as a tabstop w/ aria-live
3029
// announcement and key handling).

src/components/calendar/calendar.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@ md-calendar {
122122
// Primary table containing all date cells. Each month is a tbody in this table.
123123
.md-calendar {
124124
@include md-calendar-table();
125-
color: rgba(black, 0.7); // secondary
126125

127126
// Divider between months.
128127
tr:last-child td {
129-
border-bottom: 1px solid #e9e9e9;
128+
border-bottom-width: 1px;
129+
border-bottom-style: solid;
130130
}
131131

132132
// The divider between months doesn't actualyl change the height of the tbody in which the
@@ -136,4 +136,3 @@ md-calendar {
136136
border-top: 1px solid transparent;
137137
}
138138
}
139-

src/components/calendar/datePicker.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22
'use strict';
33

44
// PRE RELEASE
5+
// TODO(jelbourn): Documentation
6+
// TODO(jelbourn): Demo that uses moment.js
57
// TODO(jelbourn): aria attributes tying together date input and floating calendar.
6-
// TODO(jelbourn): something for mobile (probably calendar panel should take up entire screen)
78
// TODO(jelbourn): make sure this plays well with validation and ngMessages.
89
// TODO(jelbourn): forward more attributes to the internal input (required, autofocus, etc.)
910
// TODO(jelbourn): floating panel open animation (see animation for menu in spec).
10-
// TODO(jelbourn): error state
1111
// TODO(jelbourn): auto-grow input to accomodate longer dates
1212

13-
// FUTURE VERSION
13+
// POST RELEASE
14+
// TODO(jelbourn): error state
15+
// TODO(jelbourn): something better for mobile (calendar panel takes up entire screen?)
1416
// TODO(jelbourn): input behavior (masking? auto-complete?)
1517
// TODO(jelbourn): UTC mode
1618
// TODO(jelbourn): RTL

0 commit comments

Comments
 (0)