Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Issue template
about: Create an issue to help us improve
---

### Subject of the issue/enhancement/features
Describe your issue here.

### Your environment
* version (AT/Framework)
* which browser and its version
* device(s) + operating system(s)

### Steps to reproduce
Tell us how to reproduce this issue.

### Expected behaviour
Tell us what should happen

### Actual behaviour
Tell us what happens instead

### Screenshots (if you can)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ Hotgrid automatically switches to 2 columns in mobile mode for the best user exp
**Author / maintainer:** CGKineo<br>
**Accessibility support:** WAI AA<br>
**RTL support:** Yes<br>
**Cross-platform coverage:** Chrome, Chrome for Android, Firefox (ESR + latest version), Edge, IE11, Safari 14 for macOS/iOS/iPadOS, Opera<br>
**Cross-platform coverage:** Chrome, Chrome for Android, Firefox (ESR + latest version), Edge, Safari for macOS/iOS/iPadOS, Opera<br>
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adapt-hotgrid",
"version": "4.6.5",
"version": "4.7.0",
"framework": ">=5.33.10",
"homepage": "https://github.com/cgkineo/adapt-hotgrid",
"issues": "https://github.com/cgkineo/adapt-hotgrid/issues/",
Expand Down
6 changes: 3 additions & 3 deletions example.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"_layout": "full",
"title": "Hotgrid",
"displayTitle": "Hotgrid",
"body": "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.",
"body": "<b>Hotgrid</b> is a presentation component which displays a set of images in a grid layout. When a learner selects an image, a pop-up is displayed that consists of text with an image.",
"instruction": "Select the images to find out more.",
"_comment": "setCompletionOn = inview | allItems",
"_setCompletionOn": "allItems",
Expand Down Expand Up @@ -39,7 +39,7 @@
},
{
"title": "Item Title 2",
"body": "This is display text 2 with a left aligned image.",
"body": "This is display text 2 with a left aligned image. Excepteur ex incididunt occaecat irure elit ex ullamco veniam do amet laboris cupidatat. Dolore eiusmod ut commodo deserunt velit. Cupidatat velit officia amet et et qui fugiat non. Duis nulla voluptate laborum dolore.",
"_imageAlignment": "left",
"_classes": "",
"_graphic": {
Expand All @@ -58,7 +58,7 @@
},
{
"title": "Item Title 3",
"body": "This is display text 3.",
"body": "This is display text 3. Occaecat elit id consequat magna minim proident proident amet adipisicing adipisicing pariatur. Culpa Lorem cupidatat ipsum exercitation do adipisicing exercitation commodo aliquip Lorem mollit. Occaecat nostrud sunt enim eiusmod ut eiusmod aliqua irure id.",
"_imageAlignment": "right",
"_classes": "",
"_graphic": {
Expand Down
110 changes: 97 additions & 13 deletions less/hotgrid.less
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@
// --------------------------------------------------
// THEME
// --------------------------------------------------
// fallback variables if Vanilla button styles aren't supported
@item-color-style: none;
@item-ui-color-style: none;
@item-color-focus: @item-color-hover;

.hotgrid {
&__item-btn {
position: relative;
Expand Down Expand Up @@ -109,23 +114,98 @@

// Hotgrid item theme
// --------------------------------------------------
&__item-btn &__item-title,
&__item-btn &__item-icon {
background-color: @item-color;
color: @item-color-inverted;
// apply legacy styles if Vanilla button styles aren't supported
& when (@item-color-style = none) {
&__item-btn &__item-title,
&__item-btn &__item-icon {
background-color: @item-color;
color: @item-color-inverted;
}

.no-touch &__item-btn:hover &__item-title,
.no-touch &__item-btn:not(.is-disabled):not(.is-locked):hover &__item-icon {
background-color: @item-color-hover;
color: @item-color-inverted-hover;
.transition(background-color @duration ease-in, color @duration ease-in;);
}

&__item-btn.is-visited &__item-title,
&__item-btn.is-visited &__item-icon {
background-color: @visited;
color: @visited-inverted;
}
}

& when (@item-color-style = filled) {
&__item-btn &__item-title {
.item-color;
}

.no-touch &__item-btn:hover &__item-title {
.item-color-hover;
}

html:not(.a11y-disable-focusoutline) &__item-btn:focus-visible &__item-title {
.item-color-focus;
}

&__item-btn.is-visited &__item-title {
.item-color-visited;
}
}

& when (@item-ui-color-style = filled) {
&__item-btn &__item-icon {
.item-ui-color;
}

.no-touch &__item-btn:not(.is-disabled):not(.is-locked):hover &__item-icon {
.item-ui-color-hover;
}

html:not(.a11y-disable-focusoutline) &__item-btn:focus-visible &__item-icon {
.item-ui-color-focus;
}

&__item-btn.is-visited &__item-icon {
.item-ui-color-visited;
}
}

.no-touch &__item-btn:hover &__item-title,
.no-touch &__item-btn:not(.is-disabled):not(.is-locked):hover &__item-icon {
background-color: @item-color-hover;
color: @item-color-inverted-hover;
.transition(background-color @duration ease-in, color @duration ease-in;);
& when (@item-color-style = outline) {
&__item-btn &__item-title {
.item-color-outline;
}

.no-touch &__item-btn:hover &__item-title {
.item-color-outline-hover;
}

html:not(.a11y-disable-focusoutline) &__item-btn:focus-visible &__item-title {
.item-color-outline-focus;
}

&__item-btn.is-visited &__item-title {
.item-color-outline-visited;
}
}

&__item-btn.is-visited &__item-title,
&__item-btn.is-visited &__item-icon {
background-color: @visited;
color: @visited-inverted;
& when (@item-ui-color-style = outline) {
&__item-btn &__item-icon {
.item-ui-color-outline;
}

.no-touch &__item-btn:not(.is-disabled):not(.is-locked):hover &__item-icon {
.item-ui-color-outline-hover;
}

html:not(.a11y-disable-focusoutline) &__item-btn:focus-visible &__item-icon {
.item-ui-color-outline-focus;
}

&__item-btn.is-visited &__item-icon {
.item-ui-color-outline-visited;
}
}

// Hotgrid CSS border states
Expand All @@ -139,6 +219,10 @@
.transition(border-color @duration ease-in);
}

html:not(.a11y-disable-focusoutline) &__item-btn.has-css-states:focus-visible &__item-image {
border-color: @item-color-focus;
}

&__item-btn.is-visited.has-css-states &__item-image {
border-color: @visited;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adapt-hotgrid",
"version": "4.6.5",
"version": "4.7.0",
"framework": ">=5.33.10",
"homepage": "https://github.com/cgkineo/adapt-hotgrid",
"issues": "https://github.com/cgkineo/adapt-hotgrid/issues/",
Expand Down