Skip to content

Commit

Permalink
Merge pull request #462 from localgovdrupal/feature/1.x/ckeditor5-styles
Browse files Browse the repository at this point in the history
Correct styles and height of CKEditor 5 WYSIWYG
  • Loading branch information
Keelan Fadden-Hopper authored Jul 3, 2023
2 parents 294d043 + b71c217 commit ee11b0e
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 0 deletions.
113 changes: 113 additions & 0 deletions css/base/ckeditor5.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
/*
@file Styles for ckeditor5.
*/

/* Alerts */
.ck-content .alert {
padding: 2.5rem;
font-size: 1.3125rem;
font-weight: bold;
}

.alert {
border: 5px solid black;
background-color: white;
}

.alert-primary {
border-color: #652c95;
}

.alert-info {
border-color: #297bbb;
}

.alert-danger {
border-color: #e4251b;
}

.alert-fail {
border-color: #ed7522;
}

.alert-success {
border-color: #048a04;
}

/* Links */
.btn.btn-start {
padding: 0.5rem 1rem;
color: white;
border: 1px solid #048a04;
background-color: #048a04;
}

.btn.btn-start:focus,
.btn.btn-start:hover {
color: #048a04;
background-color: white;
}

.btn.btn-start::after {
position: relative;
top: 7px;
margin-left: 0.5rem;
content: "\203A";
font-size: 2.875rem;
}

.external-link::after {
background-color: #652c95;
}

.list-checked li::marker {
content: "\2714\0020";
color: #048a04;
}

/* Call out */
.callout {
color: white;
font-size: 1.3125rem;
line-height: 2;
padding-left: 0.5rem;
}

.callout a {
color: white;
}
.callout a:focus {
color: white;
background-color: #505a5f;
}

.callout-primary {
background-color: #652c95;
}

.callout-success {
background-color: #048a04;
}

.callout-danger {
background-color: #e4251b;
}

.callout-teal {
background-color: teal;
}

.callout-carbon {
background-color: #505a5f;
}

.callout-yellow,
.callout-yellow a {
color: #505a5f;
background-color: #fd0;
}

/* ckeditor minimum size */
.ck-editor__editable {
min-height: 200px;
}
2 changes: 2 additions & 0 deletions localgov_base.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ core_version_requirement: ^8.8 || ^9 || ^10
base theme: "stable9"
ckeditor_stylesheets:
- css/base/ckeditor.css
ckeditor5-stylesheets:
- css/base/ckeditor5.css

regions:
tabs: "Tabs"
Expand Down

0 comments on commit ee11b0e

Please sign in to comment.