Skip to content

Commit

Permalink
use shadow instead
Browse files Browse the repository at this point in the history
  • Loading branch information
yilinxia committed Feb 12, 2025
1 parent f008b5b commit 8ca0be8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
app.layout = layout

if __name__ == "__main__":
app.run(host="0.0.0.0", port=8050, debug=True)
app.run(host="0.0.0.0", port=8050, debug=False)

11 changes: 4 additions & 7 deletions assets/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,17 @@
}

/* Removed any margin between consecutive .btn-secondary buttons */

.hover-button {
border: 4px solid transparent;
/* Keeps border width consistent */
transition: border-color 0.2s ease-in-out, outline-width 0.2s ease-in-out;
/* Keeps border width consistent if needed for layout */
transition: box-shadow 0.2s ease-in-out;
box-sizing: border-box;
/* Prevents padding/border from shifting layout */
}

/* Applies when hovered or when the button is marked as selected */
.hover-button:hover,
.hover-button.selected {
border-color: black !important;
/* Changes border color */
outline: 3px solid black;
/* Adds extra thickness */
box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.5);
/* A stronger shadow effect */
}
2 changes: 1 addition & 1 deletion src/callbacks/explanation_callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def determine_hex_color(arg):
style={
"margin": "5px",
"backgroundColor": determine_hex_color(arg), # Set background color
# "border": "1px solid gray", # Border matches color
"border": "1px solid gray", # Border matches color
"color": "black", # Text color
},
)
Expand Down

0 comments on commit 8ca0be8

Please sign in to comment.