Skip to content

Commit

Permalink
Utilise les variables de dimentionnement de la sidebar d'activeadmin
Browse files Browse the repository at this point in the history
  • Loading branch information
etienneCharignon authored and cprodhomme committed Jan 25, 2023
1 parent 98d2854 commit a192697
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/admin/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $couleur-niveau-3: $couleur-accent-erreur;

$container: 1220px;
$sidebar-width: 290px;
$sidebar-space: calc(#{$sidebar-width} + 20px);
$section-padding: 10px;

$grid-gutter-width: 3rem;

Expand Down
6 changes: 5 additions & 1 deletion app/assets/stylesheets/admin/composants/_filtres.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
.sidebar_section {
form.filter_form {
.filter_form_field {
&.select_and_search,
&.select_and_search {
input[type='text'] {
width: 6.4rem;
}
}
&.filter_date_range {
input[type='text'] {
width: 7.188rem;
Expand Down
10 changes: 0 additions & 10 deletions app/assets/stylesheets/admin/layout/_main_structure.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
#active_admin_content {
padding: 3rem 0;

#main_content_wrapper {
#main_content {
margin-right: $sidebar-space;
}
}
#sidebar {
width: $sidebar-width;
margin-left: -$sidebar-width;
}
}

body.logged_in {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/admin/pages/_structure.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

// laisse une place à droite du #main_content pour la sidebar même si elle n'est pas là.
#active_admin_content.without_sidebar #main_content_wrapper #main_content {
margin-right: $sidebar-space;
margin-right: $sidebar-width + ($section-padding * 2);
}

&.show {
Expand Down

0 comments on commit a192697

Please sign in to comment.