-
Notifications
You must be signed in to change notification settings - Fork 3
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
Make the sidebar menu collapsible #5
Changes from all commits
27bdef1
55a168d
51c5893
2d112fa
0623804
321cdac
b9d3fd0
8ecde31
14f07bc
ed5f03f
69eb16a
9e6ba1a
f43ceb7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,17 @@ | ||
.breadcrumb { | ||
font-size: 16px; | ||
margin-bottom: 0; | ||
@include media($tablet) { | ||
font-size: 14px; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
} | ||
|
||
li { | ||
@include media($tablet) { | ||
float: none; | ||
display: inline; | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
@import "mixins/caret"; | ||
@import "mixins/flyout"; | ||
@import "mixins/line_through"; | ||
@import "mixins/media"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -198,6 +198,7 @@ $font-weight-normal: 400 !default; | |
|
||
$width-sidebar: 200px !default; | ||
$width-sidebar-flyout: 225px !default; | ||
$width-sidebar-collapsed: 42px !default; | ||
|
||
// Stacking | ||
//-------------------------------------------------------------- | ||
|
@@ -206,3 +207,14 @@ $z-index-navbar-flyout: 1000 !default; | |
// Sidebar | ||
//-------------------------------------------------------------- | ||
$border-sidebar: 1px solid $color-sidebar-border !default; | ||
|
||
// Media queries | ||
//-------------------------------------------------------------- | ||
$desktop-width: 959px; | ||
$tablet-width: 768px; | ||
$mobile-width: 480px; | ||
|
||
$large-device: "only screen and (min-width: #{$tablet-width})"; | ||
$desktop: "only screen and (max-width: #{$desktop-width})"; | ||
$tablet: "only screen and (max-width: #{$tablet-width})"; | ||
$mobile: "only screen and (max-width: #{$mobile-width})"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer always going up for media queries (making sure to always use min-width). This helps create a mobile first approach:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @graygilmore for now we just converted the skeleton media queries set here. We internally discussed about changing them to a mobile first approach but it seemed like something not related to this PR and probably something that need a better testing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 I also only just realized this wasn't a PR into Solidus itself. 🤦♂️ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it will be soon so a review at this stage is very helpful, thanks @graygilmore |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@mixin flyout { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as said above, I'd remove this mixin in favor of a better code organization. |
||
position: absolute; | ||
top: 0; | ||
left: 100%; | ||
width: $width-sidebar-flyout; | ||
margin-left: 0; | ||
border: $border-sidebar; | ||
background: $color-navbar-submenu-bg; | ||
box-shadow: $box-shadow; | ||
@include caret($direction: left, $color-caret: $color-navbar-submenu-bg); | ||
|
||
&:before { | ||
z-index: 1; | ||
top: 1.5em; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/// Outputs a media-query block. | ||
/// | ||
/// @param {String} $media-query | ||
/// A string corresponding to the media query to target. | ||
/// | ||
/// @example scss - Usage | ||
/// .responsive-element { | ||
/// color: blue; | ||
/// @include media("screen and (min-width: 480px)") { | ||
/// color: red; | ||
/// } | ||
/// } | ||
/// | ||
/// @example css - CSS Output | ||
/// .responsive-element { | ||
/// color: blue; | ||
/// } | ||
/// @media screen and (min-width: 480px) { | ||
/// .responsive-element { | ||
/// color: red; | ||
/// } | ||
/// } | ||
|
||
@mixin media($media-query) { | ||
@media #{$media-query} { | ||
@content; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's inline-block by default do we need this additional media query?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it is not mobile first approach, we need to reset the display property.