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

fixing accesibility issues in the cookie setting #2715

Closed
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
17 changes: 17 additions & 0 deletions src/styles/_global-styles.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// :root {
// --green1: #4de0b4;
// }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this commented out code? It doesn't appear to have a purpose any longer.


html {
position: relative;
min-height: 100%;
Expand Down Expand Up @@ -42,6 +46,19 @@ ds-admin-sidebar {
z-index: 0;
}

.klaro
.cookie-notice
.cm-btn.cm-btn-success {
color: #333333 !important;
background-color: #4de0b4 !important;
}

.klaro
.cookie-notice
a{
color: #4de0b4 !important;
}

Comment on lines +49 to +61
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In your code, the usage of !important is unnecessary. Instead, you can enhance the specificity of your selectors and leverage SCSS's features to avoid duplicating selectors. Here's an example of how your code can be refactored to eliminate the need for !important:

.klaro,
.cookie-notice,
.cn-buttons {
  .cm-btn.cm-btn-success {
    color: #333333;
    background-color: #4de0b4;
  }

  a {
    color: #4de0b4;
  }
}

Additionally, it seems you've deviated from the approach of using new variables. The variable --green1 is used in the Klaro class and it works perfectly. I believe the original intention was to use this variable for maintainability and consistency. Here's how the code should look with the variable:

:root {
   --green1: #4de0b4;  // This variable represents the success color for the Klaro cookie banner
   --button-text-color: #333; // This variable represents the text color for buttons in the Klaro cookie banner
}

.klaro,
.cookie-notice,
.cn-buttons {
  .cm-btn.cm-btn-success {
    color: var(--button-text-color);
    background-color: var(--green1);
  }

  a {
    color: var(--green1);
  }
}

.media-viewer
.change-gallery
.ngx-gallery
Expand Down
Loading