Skip to content

Commit

Permalink
Clean up some CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
otacke committed Dec 22, 2023
1 parent 77957ef commit 9c84168
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 82 deletions.
6 changes: 1 addition & 5 deletions src/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ import '@styles/h5p-portfolio.scss';
* chapter transition and sizing. It is okay for Interactive Book, but now that
* there can be a hotspots navigation, a header and a footer with different
* needs, it's not. The pagecontent DOM should be refactored to not use absolute
* positioning and heights set in CSS.
*
* Rename CSS classes to reflect the JavaScript class name/filename
*
* Change em to rem
* positioning and heights set in CSS. Grid is a hot candidate
*/

export default class Portfolio extends H5P.EventDispatcher {
Expand Down
16 changes: 16 additions & 0 deletions src/scripts/components/sidebar/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,22 @@
opacity: 0;
visibility: none;
}

&.icon-expanded {
&::before {
content: '\e901';
width: 1.5rem;
display: inline-block;
}
}

&.icon-collapsed {
&::before {
content: '\e902';
width: 1.5rem;
display: inline-block;
}
}
}

&.h5p-portfolio-navigation-chapter-content {
Expand Down
22 changes: 22 additions & 0 deletions src/scripts/components/statusbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
color: var(--color-base, $base-color);
font-size: 1.5rem;
margin: auto;

&::before {
content: '\e906';
}
}

&.h5p-portfolio-status-menu-active {
Expand Down Expand Up @@ -201,6 +205,24 @@
color: var(--color-base, $base-color);
font-size: 1.5rem;
margin: auto;

&.icon-previous {
&::before {
content: '\e907';
}
}

&.icon-next {
&::before {
content: '\e908';
}
}

&.icon-up {
&::before {
content: '\e909';
}
}
}

&.disabled .navigation-button {
Expand Down
77 changes: 0 additions & 77 deletions src/styles/h5p-portfolio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@
@media (max-width: 40rem) {
.h5p-portfolio {
.h5p-portfolio-main {

&.h5p-portfolio-navigation-open {

.h5p-portfolio-navigation {
Expand Down Expand Up @@ -164,79 +163,3 @@
}
}
}

.icon-expanded {
&::before {
content: '\e901';
width: 1.5rem;
display: inline-block;
}
}

.icon-collapsed {
&::before {
content: '\e902';
width: 1.5rem;
display: inline-block;
}
}

.icon-menu {
&::before {
content: '\e906';
}
}

.icon-previous {
&::before {
content: '\e907';
}
}

.icon-next {
&::before {
content: '\e908';
}
}

.icon-up {
&::before {
content: '\e909';
}
}

.icon-question-answered {
&::before {
content: '\e90a';
}
}

.icon-enable-fullscreen {
&::before {
content: '\e90b';
}
}

.icon-disable-fullscreen {
&::before {
content: '\e90c';
}
}

.icon-restart {
&::before {
content: '\e90d';
}
}

.icon-paper-pencil {
&::before {
content: '\e90e';
}
}

.icon-paper {
&::before {
content: '\e90f';
}
}

0 comments on commit 9c84168

Please sign in to comment.