Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New: Adapt buttons overhaul (fixes #469) #490

Open
wants to merge 87 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
8df47a4
Content item focus and disabled state added
kirsty-hames Jan 11, 2024
31c845f
Content button focus, selected, locked and disabled state added
kirsty-hames Jan 11, 2024
2d76066
Set up btn-ui-color variables
guywillis Jan 12, 2024
86ded18
Set up btn-color and btn-ui-color mixins
guywillis Jan 12, 2024
0902920
Removed previous btn styling, added new mixin support
guywillis Jan 12, 2024
fe1cd97
Added missing styling to plugins
guywillis Jan 12, 2024
e2c978c
Narrative controls disabled fix
guywillis Jan 12, 2024
c06e250
Added item-color mixins
guywillis Jan 15, 2024
a3206dd
Added comments / questions
guywillis Jan 15, 2024
aa52dc8
ui color vars replaced
kirsty-hames Jan 15, 2024
b572119
Added ui button controls mixin
kirsty-hames Jan 16, 2024
60cabbb
Added comments / questions
kirsty-hames Jan 16, 2024
3c48fb9
Menu item btn focus and locked state added
kirsty-hames Jan 16, 2024
98ae77b
Fix menu item btn locked state to inherit from disabled vars
kirsty-hames Jan 16, 2024
18046ff
notify ui btn mixins
guywillis Jan 17, 2024
9693002
Add item ui mixin
kirsty-hames Jan 17, 2024
e051567
Comments updated
kirsty-hames Jan 17, 2024
cb29593
Apply item ui mixin to plugin files
kirsty-hames Jan 17, 2024
8fd5b33
UI control mixins, nav btn padding
guywillis Jan 17, 2024
49ee8a7
Merge branch 'issue/469' of https://github.com/adaptlearning/adapt-co…
guywillis Jan 17, 2024
179f634
Updated UI base inverted colour for aa contrast
guywillis Jan 17, 2024
6cffe36
Removed unused disabled state from boxMenuItem btn
guywillis Jan 17, 2024
49987b0
Focus states added to Hotgraphic pin, Media transcript btn, Narrative…
kirsty-hames Jan 17, 2024
18c9618
Adjusted notify and drawer colour definitions
guywillis Jan 17, 2024
4158bfb
Comment updates
guywillis Jan 17, 2024
d21a1d8
Merge branch 'issue/469' of https://github.com/adaptlearning/adapt-co…
guywillis Jan 17, 2024
179bd74
Set @item-ui-color to inherit from @item-color by default
kirsty-hames Jan 17, 2024
519156a
Added drawer item color mixins
kirsty-hames Jan 18, 2024
b3551cf
Add drawer item vars for margin, padding and border
kirsty-hames Jan 18, 2024
9782c7f
Drawer item focus state added
kirsty-hames Jan 18, 2024
e22f330
Update glossary padding vars
kirsty-hames Jan 18, 2024
b827321
Comment updates
kirsty-hames Jan 18, 2024
d690bcc
Notify btn mixin
guywillis Jan 19, 2024
13bd381
Item color mixin application
guywillis Jan 19, 2024
8f165ac
Comments
guywillis Jan 19, 2024
d571965
comments
kirsty-hames Jan 22, 2024
e4773b5
Menu item btn mixin, control > ctrl, comments updated
guywillis Jan 22, 2024
0970ecd
Resource drawer item mixins
guywillis Jan 22, 2024
8f880e1
Typo fix
guywillis Jan 22, 2024
6956e5d
comments
kirsty-hames Jan 22, 2024
d5c5903
restore @drawer-item-margin default
kirsty-hames Jan 23, 2024
ff3a3cf
Added @nav-icon-focus and comments updated
kirsty-hames Jan 23, 2024
15b2c62
Merge branch 'master' into issue/469
guywillis Jan 25, 2024
68a2b52
Removed nots from focus state
guywillis Jan 25, 2024
100acfa
Added missing focus states
guywillis Jan 25, 2024
0ed9e97
Matching dropdown updates
guywillis Jan 25, 2024
1fc4e70
Added notify push icon focus state
guywillis Jan 25, 2024
f38a49b
trickle btn locked state added
kirsty-hames Mar 12, 2024
b792f4f
Button expanded mixin test
guywillis Mar 18, 2024
7662a70
Buttons fill / outline / plain update
guywillis Mar 22, 2024
dc894f2
Merge branch 'master' into issue/469
guywillis Jun 10, 2024
2efbabf
Added item-color-outline mixins
guywillis Jun 12, 2024
fc1e008
btn styles added to state mixins
kirsty-hames Jun 12, 2024
1690fd3
btn styles added to state mixins
kirsty-hames Jun 12, 2024
810935e
notify ui disabled state added
kirsty-hames Jun 12, 2024
2c57639
btn outline mixin color fixes
kirsty-hames Jun 13, 2024
005df49
remove unused btn outline 'border-color' vars
kirsty-hames Jun 13, 2024
629f915
move btn 'border-width' vars into spacing config
kirsty-hames Jun 13, 2024
3ac95e6
nav ui mixin name change for consistency with other color variable na…
kirsty-hames Jun 13, 2024
643fb67
nav ui mixin name change for consistency with other color variable na…
kirsty-hames Jun 13, 2024
da3a525
button styles applied to _defaults and core files
kirsty-hames Jun 13, 2024
08862f5
button styles applied to plugin files
kirsty-hames Jun 17, 2024
1f3ccf5
todo comment update
kirsty-hames Jun 17, 2024
6e574d2
Button styles updated
guywillis Jun 21, 2024
f060ca1
Small optimisations
guywillis Jun 21, 2024
1db3254
// ! todo comment updates
guywillis Jun 21, 2024
45c319d
Added less style vars
guywillis Jun 24, 2024
0845a76
move question btn styles into separate file
kirsty-hames Jun 24, 2024
08d8f85
Test code optimisation
guywillis Jun 24, 2024
38a50ce
Merge branch 'issue/469' of https://github.com/adaptlearning/adapt-co…
guywillis Jun 24, 2024
1840735
Code optimisation
guywillis Jun 25, 2024
b8e02e7
button border width variable amends
kirsty-hames Jul 1, 2024
f95324e
comments amended for deprecated color variables
kirsty-hames Jul 1, 2024
2abcfad
invert .pagelevelprogress__indicator border color for outline btn style
kirsty-hames Jul 1, 2024
d0cbb38
Merge branch 'master' into issue/469
guywillis Jul 3, 2024
4d0ddd5
Matching drop down list item styling
guywillis Jul 5, 2024
7c32672
Resource comment updated
guywillis Jul 5, 2024
39351d2
Border radius update
guywillis Jul 5, 2024
c7de39f
Merge branch 'master' into issue/469
kirsty-hames Nov 27, 2024
661e274
deprecated @btn-icon-color vars added for legacy support only - preve…
kirsty-hames Nov 27, 2024
7283845
deprecated .notify-btn-icon mixin added for legacy support only - pre…
kirsty-hames Nov 27, 2024
5dfd74b
deprecated generic .btn-text and .btn-icon color styles added for leg…
kirsty-hames Dec 4, 2024
6168a9a
remove 'plain' button styles
kirsty-hames Dec 5, 2024
0d87fbe
Matching drop down list item styling
kirsty-hames Dec 5, 2024
9bb1e5b
button style comments removed/updated
kirsty-hames Dec 18, 2024
0df22a6
comments removed
kirsty-hames Dec 18, 2024
543e198
rename _state-mixins.less to _btn-style.less
kirsty-hames Dec 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions less/_defaults/_btn-mixins.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Notify and Drawer controls (< > x)

// DEPRECATED
// for legacy support only, replaced by .ui-btn-ctrl()
.notify-btn-icon() {
.ui-btn-ctrl();
}
//

.ui-btn-ctrl() {
margin: @ui-btn-controls-margin;
padding: @ui-btn-controls-padding;
border-radius: @ui-btn-controls-border-radius;
}
13 changes: 13 additions & 0 deletions less/_defaults/_btn-style.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Button styles
// Note: default styles include 'filled' and 'outline'
// --------------------------------------------------
@item-color-style: filled;
@item-ui-color-style: filled;
@btn-color-style: filled;
@menu-item-btn-color-style: filled;
@ui-color-style: filled;
@nav-ui-btn-ctrl-color-style: filled;
@notify-ui-btn-ctrl-color-style: filled;
@notify-btn-color-style: filled;
@drawer-ui-btn-ctrl-color-style: filled;
@drawer-item-color-style: filled;
70 changes: 70 additions & 0 deletions less/_defaults/_buttonMixins/_btnStyles.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// --------------------------------------------------
// BUTTON COLOUR MIXINS
// --------------------------------------------------

// Default - Filled
.btn-color() {
background-color: @btn-color;
color: @btn-color-inverted;
border-radius: @btn-border-radius;
}

.btn-color-hover() {
background-color: @btn-color-hover;
color: @btn-color-inverted-hover;
.transition(background-color @duration ease-in, color @duration ease-in;);
}

.btn-color-focus() {
background-color: @btn-color-focus;
color: @btn-color-inverted-focus;
}

.btn-color-selected() {
background-color: @btn-color-selected;
color: @btn-color-inverted-selected;
}

.btn-color-locked() {
background-color: @btn-color-locked;
color: @btn-color-inverted-locked;
}

.btn-color-disabled() {
background-color: @btn-color-disabled;
color: @btn-color-inverted-disabled;
}

// Outline
.btn-color-outline() {
background-color: @btn-color-inverted;
color: @btn-color;
box-shadow: 0 0 0 @btn-color-border-width @btn-color inset;
border-radius: @btn-border-radius;
}

.btn-color-outline-hover() {
.btn-color-hover;
box-shadow: 0 0 0 @btn-color-border-width @btn-color-hover inset;
.transition(background-color @duration ease-in, color @duration ease-in, box-shadow @duration ease-in;);
}

.btn-color-outline-focus() {
.btn-color-focus;
box-shadow: 0 0 0 @btn-color-border-width @btn-color-focus inset;
}

.btn-color-outline-selected() {
.btn-color-selected;
box-shadow: 0 0 0 @btn-color-border-width @btn-color-selected inset;
}

.btn-color-outline-locked() {
.btn-color-locked;
box-shadow: 0 0 0 @btn-color-border-width @btn-color-locked inset;
}

.btn-color-outline-disabled() {
.btn-color-disabled;
box-shadow: 0 0 0 @btn-color-border-width @btn-color-disabled inset;
}
65 changes: 65 additions & 0 deletions less/_defaults/_buttonMixins/_drawerItemStyles.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// --------------------------------------------------
// DRAWER ITEM COLOUR MIXINS
// --------------------------------------------------

// Default - Filled
.drawer-item-color() {
background-color: @drawer-item;
color: @drawer-item-inverted;
border-color: @drawer-item-hover;
border-radius: @drawer-item-border-radius;
}

.drawer-item-color-hover() {
background-color: @drawer-item-hover;
color: @drawer-item-inverted-hover;
border-color: @drawer-item-hover;
.transition(background-color @duration ease-in, color @duration ease-in, border @duration ease-in;);
}

.drawer-item-color-focus() {
background-color: @drawer-item-focus;
color: @drawer-item-inverted-focus;
border-color: @drawer-item-focus;
}

.drawer-item-color-locked() {
background-color: @disabled;
color: @disabled-inverted;
border-color: @drawer-item-hover;
}

.drawer-item-color-selected() {
background-color: @drawer-item-selected;
color: @drawer-item-inverted-selected;
border-color: @drawer-item-hover;
}

// Outline
.drawer-item-color-outline() {
background-color: @drawer-item-inverted;
color: @drawer-item;
box-shadow: 0 0 0 @drawer-item-border-width @drawer-item inset;
border-radius: @drawer-item-border-radius;
}

.drawer-item-color-outline-hover() {
.drawer-item-color-hover;
box-shadow: 0 0 0 @drawer-item-border-width @drawer-item-hover inset;
.transition(background-color @duration ease-in, color @duration ease-in, box-shadow @duration ease-in;);
}

.drawer-item-color-outline-focus() {
.drawer-item-color-focus;
box-shadow: 0 0 0 @drawer-item-border-width @drawer-item-focus inset;
}

.drawer-item-color-outline-selected() {
.drawer-item-color-selected;
box-shadow: 0 0 0 @drawer-item-border-width @drawer-item-selected inset;
}

.drawer-item-color-outline-locked() {
.drawer-item-color-locked;
box-shadow: 0 0 0 @drawer-item-border-width @drawer-item-locked inset;
}
38 changes: 38 additions & 0 deletions less/_defaults/_buttonMixins/_drawerUiStyles.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// --------------------------------------------------
// DRAWER UI COLOUR MIXINS
// --------------------------------------------------

// Default - Filled
.drawer-ui-btn-ctrl-color() {
background-color: @drawer-icon;
color: @drawer-icon-inverted;
}

.drawer-ui-btn-ctrl-color-hover() {
background-color: @drawer-icon-hover;
color: @drawer-icon-inverted-hover;
.transition(background-color @duration ease-in, color @duration ease-in;);
}

.drawer-ui-btn-ctrl-color-focus() {
background-color: @drawer-icon-focus;
color: @drawer-icon-inverted-focus;
}

// Outline
.drawer-ui-btn-ctrl-color-outline() {
background-color: @drawer-icon;
color: @drawer-icon-inverted;
box-shadow: 0 0 0 @ui-btn-controls-border-width @drawer-icon-inverted inset;
}

.drawer-ui-btn-ctrl-color-outline-hover() {
.drawer-ui-btn-ctrl-color-hover;
box-shadow: 0 0 0 @ui-btn-controls-border-width @drawer-icon-hover inset;
.transition(background-color @duration ease-in, color @duration ease-in, box-shadow @duration ease-in;);
}

.drawer-ui-btn-ctrl-color-outline-focus() {
.drawer-ui-btn-ctrl-color-focus;
box-shadow: 0 0 0 @ui-btn-controls-border-width @drawer-icon-focus inset;
}
70 changes: 70 additions & 0 deletions less/_defaults/_buttonMixins/_itemStyles.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// --------------------------------------------------
// ITEM COLOUR MIXINS
// --------------------------------------------------

// Default - Filled
.item-color() {
background-color: @item-color;
color: @item-color-inverted;
border-radius: @item-border-radius;
}

.item-color-hover() {
background-color: @item-color-hover;
color: @item-color-inverted-hover;
.transition(background-color @duration ease-in, color @duration ease-in;);
}

.item-color-focus() {
background-color: @item-color-focus;
color: @item-color-inverted-focus;
}

.item-color-selected() {
background-color: @item-color-selected;
color: @item-color-inverted-selected;
}

.item-color-visited() {
background-color: @visited;
color: @visited-inverted;
}

.item-color-disabled() {
background-color: @item-color-disabled;
color: @item-color-inverted-disabled;
}

// Outline
.item-color-outline() {
background-color: @item-color-inverted;
color: @item-color;
box-shadow: 0 0 0 @item-color-border-width @item-color inset;
border-radius: @item-border-radius;
}

.item-color-outline-hover() {
.item-color-hover;
box-shadow: 0 0 0 @item-color-border-width @item-color-hover inset;
.transition(background-color @duration ease-in, color @duration ease-in, box-shadow @duration ease-in;);
}

.item-color-outline-focus() {
.item-color-focus;
box-shadow: 0 0 0 @item-color-border-width @item-color-focus inset;
}

.item-color-outline-selected() {
.item-color-selected;
box-shadow: 0 0 0 @item-color-border-width @item-color-selected inset;
}

.item-color-outline-visited() {
.item-color-visited;
box-shadow: 0 0 0 @item-color-border-width @item-color-visited inset;
}

.item-color-outline-disabled() {
.item-color-disabled;
box-shadow: 0 0 0 @item-color-border-width @item-color-disabled inset;
}
80 changes: 80 additions & 0 deletions less/_defaults/_buttonMixins/_itemUiStyles.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// --------------------------------------------------
// ITEM UI COLOUR MIXINS
// --------------------------------------------------

// Default - Filled
.item-ui-color() {
background-color: @item-ui-color;
color: @item-ui-color-inverted;
border-radius: @item-ui-border-radius;
}

.item-ui-color-hover() {
background-color: @item-ui-color-hover;
color: @item-ui-color-inverted-hover;
.transition(background-color @duration ease-in, color @duration ease-in;);
}

.item-ui-color-focus() {
background-color: @item-ui-color-focus;
color: @item-ui-color-inverted-focus;
}

.item-ui-color-visited() {
background-color: @item-ui-color-visited;
color: @item-ui-color-inverted-visited;
}

.item-ui-color-selected() {
background-color: @item-ui-color-selected;
color: @item-ui-color-inverted-selected;
}

.item-ui-color-locked() {
background-color: @item-ui-color-locked;
color: @item-ui-color-inverted-locked;
}

.item-ui-color-disabled() {
background-color: @item-ui-color-disabled;
color: @item-ui-color-inverted-disabled;
}

// Outline
.item-ui-color-outline() {
background-color: @item-ui-color-inverted;
color: @item-ui-color;
box-shadow: 0 0 0 @item-ui-border-width @item-color inset;
border-radius: @item-ui-border-radius;
}

.item-ui-color-outline-hover() {
.item-ui-color-hover;
box-shadow: 0 0 0 @item-ui-border-width @item-ui-color-hover inset;
.transition(background-color @duration ease-in, color @duration ease-in, box-shadow @duration ease-in;);
}

.item-ui-color-outline-focus() {
.item-ui-color-focus;
box-shadow: 0 0 0 @item-ui-border-width @item-ui-color-focus inset;
}

.item-ui-color-outline-selected() {
.item-ui-color-selected;
box-shadow: 0 0 0 @item-ui-border-width @item-ui-color-selected inset;
}

.item-ui-color-outline-visited() {
.item-ui-color-visited;
box-shadow: 0 0 0 @item-ui-border-width @item-ui-color-visited inset;
}

.item-ui-color-outline-locked() {
.item-ui-color-locked;
box-shadow: 0 0 0 @item-ui-border-width @item-ui-color-locked inset;
}

.item-ui-color-outline-disabled() {
.item-ui-color-disabled;
box-shadow: 0 0 0 @item-ui-border-width @item-ui-color-disabled inset;
}
Loading