Skip to content

Commit

Permalink
Color of menu buttons should adhere to Main Event Color (#210)
Browse files Browse the repository at this point in the history
* Color of menu buttons should adhere to Main Event Color and a second color should be available for scroll over

* fix-206 fix font color to switch to white to have a good readable contrast
  • Loading branch information
lcduong authored Oct 1, 2024
1 parent d7f603e commit 37d500c
Showing 1 changed file with 49 additions and 12 deletions.
61 changes: 49 additions & 12 deletions src/pretalx/static/agenda/scss/_agenda.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,55 @@ header {
}
}

@function is-dark($color) {
$luminance: (0.2126 * red($color) + 0.7152 * green($color) + 0.0722 * blue($color)) / 255;
@return $luminance < 0.5;
}

@mixin contrast-color($bg-color) {
@if is-dark($bg-color) {
color: #fff;
} @else {
color: #000;
}
}

@mixin active-state($color) {
background-color: $color;
@include contrast-color($color);
}

@mixin outline-button($color) {
color: $color;
border-color: $color;

&:hover, &.active {
@include active-state($color);
}
}

#schedule-nav {
display: flex;
flex-direction: row;
align-content: space-between;
z-index: 900;
display: flex;
flex-direction: row;
align-content: space-between;
z-index: 900;

a {
font-size: 16px;
font-weight: normal;
border-radius: 0;
margin: 0;
&.active {
a {
font-size: 16px;
font-weight: normal;
border-radius: 0;
margin: 0;
&.active {
}
}

.btn-outline-success {
@include outline-button($brand-primary);
}

.btn-outline-info {
@include outline-button($brand-primary);
}
}

form {
max-width: 250px;
Expand All @@ -73,6 +108,8 @@ header {
summary {
height: 100%;
margin-bottom: 3px;
color: $brand-primary;
border-color: $brand-primary;
}
}
}
Expand Down Expand Up @@ -476,4 +513,4 @@ article .pretalx-session .pretalx-session-info .abstract {
transition: opacity .5s ease-in-out;
-moz-transition: opacity .5s ease-in-out;
-webkit-transition: opacity .5s ease-in-out;
}
}

0 comments on commit 37d500c

Please sign in to comment.