Skip to content

Commit 79a79e6

Browse files
committed
Ensure consistent appearance of btn-link
After migrating `link_to` to `button_to` (in the previous commit), we need to adjust the styles for a uniform and correct appearance.
1 parent 0a38755 commit 79a79e6

File tree

5 files changed

+20
-7
lines changed

5 files changed

+20
-7
lines changed

app/assets/stylesheets/base.css.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ span.caret {
5151
margin-left: 0.5em;
5252
}
5353

54-
.btn {
54+
.btn:not(.btn-link) {
5555
-webkit-font-smoothing: antialiased;
5656
font-weight: 500;
5757
:not(.btn-lg) {

app/assets/stylesheets/editor.css.scss

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,19 @@ html[data-bs-theme="light"] {
9696
display: none;
9797
}
9898

99-
#statusbar{
99+
#statusbar {
100100
visibility: hidden;
101101
margin-top: .2em;
102102
height: 1.6em;
103103
color: var(--bs-tertiary-color);
104-
font-size: 0.8em;
104+
font-size: 0.8rem;
105105
}
106106

107-
#turtlecanvas{
107+
.btn-statusbar {
108+
--bs-btn-font-size: 0.8rem;
109+
}
110+
111+
#turtlecanvas {
108112
border-style:solid;
109113
border-width:thin;
110114
display: block;

app/javascript/stylesheets.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ html[data-bs-theme="light"] {
4040
}
4141
}
4242

43+
44+
// Match the button styles for .btn-link to regular links.
45+
.btn-link {
46+
@extend .p-0;
47+
@extend .border-0;
48+
@extend .align-baseline;
49+
}
50+
51+
4352
$fa-font-path: '@fortawesome/fontawesome-free/webfonts/';
4453
@import '@fortawesome/fontawesome-free/scss/fontawesome';
4554
@import '@fortawesome/fontawesome-free/scss/solid';

app/views/execution_environments/shell.html.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ h1 = @execution_environment
2020
.card-body.pt-0.pe-0.ps-1.pb-1
2121
#download-file-tree.justify-content-center.d-flex.my-3
2222
span.mx-1 = t('execution_environments.shell.file_tree.empty')
23-
button#reload-now-link.btn.btn-link.p-0.m-0.border-0 = t('execution_environments.shell.file_tree.list_now')
23+
button#reload-now-link.btn.btn-link = t('execution_environments.shell.file_tree.list_now')
2424
- unless @execution_environment.privileged_execution?
2525
.card-footer.justify-content-center.align-items-center.d-flex.text-body-secondary
2626
i.fa-solid.fa-info

app/views/exercises/_editor.html.slim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#statusbar.d-flex.justify-content-between
3434
div
3535
- if !@embed_options[:disable_download] && @exercise.hide_file_tree?
36-
button#download.p-0.border-0.btn-link.visible.bg-body.text-primary
36+
button#download.btn.btn-link.btn-statusbar.visible
3737
i.fa-solid.fa-arrow-down
3838
= t('exercises.editor.download')
3939

@@ -55,7 +55,7 @@
5555

5656
= ' | '
5757

58-
button#start-over-active-file.p-0.border-0.btn-link.bg-body.text-primary data-message-confirm=t('exercises.editor.confirm_start_over_active_file') data-url=reload_exercise_path(@exercise)
58+
button#start-over-active-file.btn.btn-link.btn-statusbar data-message-confirm=t('exercises.editor.confirm_start_over_active_file') data-url=reload_exercise_path(@exercise)
5959
i.fa-solid.fa-circle-notch.fa-spin.d-none
6060
i.fa-solid.fa-clock-rotate-left
6161
= t('exercises.editor.start_over_active_file')

0 commit comments

Comments
 (0)