Skip to content

Commit

Permalink
feat(calendar): add size variations
Browse files Browse the repository at this point in the history
This PR adds classic size variations for the calendar module. I've tested it and so far didn't found any issue, but i'm a little bit rusted.
  • Loading branch information
prudho authored Aug 1, 2023
1 parent 09d0671 commit 1afaf65
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/definitions/modules/calendar.less
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,35 @@
}
}

/* --------------------
Sizes
--------------------- */

& when not (@variationCalendarSizes = false) {
each(@variationCalendarSizes, {
@s: @@value;
.ui.@{value}.calendar,
.ui.@{value}.calendar .ui.table tr th,
.ui.@{value}.calendar .ui.table tr td {
font-size: @s;
}
.ui.@{value}.calendar .ui.table.year,
.ui.@{value}.calendar .ui.table.month,
.ui.@{value}.calendar .ui.table.minute {
min-width: unit(15 * @s, em);
}
.ui.@{value}.calendar .ui.table.day {
min-width: unit(18 * @s, em);
}
.ui.@{value}.calendar .ui.table.day.andweek {
min-width: unit(22 * @s, em);
}
.ui.@{value}.calendar .ui.table.hour {
min-width: unit(20 * @s, em);
}
});
}

/*******************************
States
*******************************/
Expand Down
1 change: 1 addition & 0 deletions src/themes/default/globals/variation.variables
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@
@variationCalendarInverted: true;
@variationCalendarDisabled: true;
@variationCalendarMultiMonth: true;
@variationCalendarSizes: @variationAllSizes;

/* Checkbox */
@variationCheckboxDisabled: true;
Expand Down

0 comments on commit 1afaf65

Please sign in to comment.