Skip to content
This repository has been archived by the owner on Oct 25, 2021. It is now read-only.

Commit

Permalink
Minor adjustments to GDS 3 styling
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaDelBuono committed Aug 2, 2019
1 parent 49a440f commit 98117ed
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 9 deletions.
28 changes: 24 additions & 4 deletions assets/css/hmcts-webchat-gds-v3.css
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ input[type="number"] {

button,
input[type="submit"] {
background-color: #00823b !important;
background-color: #00703c !important;
background-image: none !important;
border-color: transparent !important;
color: #ffffff !important;
Expand All @@ -1137,10 +1137,30 @@ input[type="submit"] {
width: calc(100% - 40px) !important;
}

button:hover, button:focus,
input[type="submit"]:hover,
button:hover,
input[type="submit"]:hover {
background-color: #005a30 !important;
}

button:focus,
input[type="submit"]:focus {
background-color: #00682f !important;
border-color: #ffdd00 !important;
box-shadow: inset 0 0 0 1px #ffdd00 !important;
outline: 3px solid transparent;
}

button:focus:not(:active):not(:hover),
input[type="submit"]:focus:not(:active):not(:hover) {
background-color: #ffdd00 !important;
border-color: #ffdd00 !important;
box-shadow: 0 2px 0 #0b0c0c !important;
color: #0b0c0c !important;
}

button:active,
input[type="submit"]:active {
box-shadow: 0 2px 0 #002d18;
outline: 0;
}

input[type="text"],
Expand Down
2 changes: 1 addition & 1 deletion assets/javascript/hmcts-webchat.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function parseText(text) {
}

function webchat_init(customParams) {
const version = '0.3.4';
const version = '0.3.5';
const requiredParams = [
'uuid',
'tenant',
Expand Down
23 changes: 20 additions & 3 deletions assets/sass/hmcts-webchat-gds-v3.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@import "node_modules/govuk-frontend-3/govuk/components/label/label";
@import "node_modules/govuk-frontend-3/govuk/components/textarea/textarea";

$govuk-button-colour: #00823b; // sass-lint:disable no-color-literals
$govuk-button-colour: govuk-colour("green");; // sass-lint:disable no-color-literals
$govuk-button-hover-colour: govuk-shade($govuk-button-colour, 20%);
$govuk-button-shadow-colour: govuk-shade($govuk-button-colour, 60%);
$govuk-button-text-colour: govuk-colour("white");
Expand All @@ -24,10 +24,27 @@ input[type="submit"] {
margin-top: 10px !important;
width: calc(100% - 40px) !important;

&:hover,
&:focus {
&:hover {
background-color: $govuk-button-hover-colour !important;
}

&:focus {
border-color: govuk-colour("yellow") !important;
box-shadow: inset 0 0 0 1px govuk-colour("yellow") !important;
outline: 3px solid transparent;

&:not(:active):not(:hover) {
background-color: govuk-colour("yellow") !important;
border-color: govuk-colour("yellow") !important;
box-shadow: 0 2px 0 govuk-colour("black") !important;
color: govuk-colour("black") !important;
}
}

&:active {
box-shadow: 0 2px 0 $govuk-button-shadow-colour;
outline: 0;
}
}

input[type="text"],
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": "@hmcts/ctsc-web-chat",
"version": "0.3.4",
"version": "0.3.5",
"description": "HMCTS CTSC Web Chat",
"repository": {
"type": "git",
Expand Down

0 comments on commit 98117ed

Please sign in to comment.