-
Notifications
You must be signed in to change notification settings - Fork 15
Conversation
Variables: $grid-column-count and $grid-baseline Deprecate: make-row (now grid-row) make-col (now grid-col) make-offset-left (now grid-offset-left) make-offset-right (now grid-offset-right)
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.
maybe tidy that container
mixin? added a comment on that.
also, we could add that weird dimensions breakpoint fix that we talked about & is in this PR - https://github.com/ueno-llc/ueno-www/pull/342 -
(will need to be documented & maybe even commented out by default?)
shared/styles/mixins.scss
Outdated
@@ -83,7 +97,7 @@ | |||
padding: 0 $container-gutter-mobile; | |||
max-width: $page-width + $container-gutter-mobile * 1; |
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.
this mobile stuff in container
doesn't really do anything; $page-width
is always going to be greater than mobile viewports anyway and I am not sure why there are differences between the base size ($page-width
+ $container-gutter-mobile * 1
) and min-mobile anyway?
also, there may be instances where we need to override top & bottom padding / margins, so this would be over-written at the next mq:
&__container {
@include container;
padding-top: percentage(50px/$page-limit);
// overwritten at tablet to 0;
}
could left & right be explicitly declared as long-hand values rather than short-hand?
Like:
@mixin container() {
margin-left: auto;
margin-right: auto;
padding-left: $container-gutter-mobile;
padding-right: $container-gutter-mobile;
@media (min-width: $min-tablet) {
padding-left: $container-gutter-tablet;
padding-right: $container-gutter-tablet;
max-width: $page-width + $container-gutter-tablet * 2;
}
@media (min-width: $min-desktop) {
padding-left: $container-gutter-desktop;
padding-right: $container-gutter-desktop;
max-width: $page-width + $container-gutter-desktop * 2;
}
}
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.
It should definitely not use shorthand for padding.
shared/styles/grid.scss
Outdated
@mixin make-row($direction: ltr, $align: stretch, $justify: flex-start, $grid-gutter: $gutter, $wrap: wrap) { | ||
@warn 'make-row mixin is deprecated, use grid-row'; | ||
@include grid-row($direction, $align, $justify, $grid-gutter, $wrap); | ||
} |
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.
You can do:
@mixin make-row($args...) {
...
@include grid-row($args...);
}
Yeah, I had the scale thingie in mind. Has it been reviewed? Or should I just port it here and add to a page for easier review? |
yeah @osk maybe add in from that PR & we can test here instead -- not sure it needs to be implemented for ueno.co anyway (or at least there is no urgent need) |
It would be nice to add these to html {} in base.scss |
I've updated according to comments. @organdonor47 I'll add the scale experiment in a new branch after this one is merged. |
First version with simple calculation with fallback
On second thought, added a first version of scaling to |
shared/styles/grid.scss
Outdated
margin-left: convertify($offset); | ||
} | ||
|
||
@mixin make-offset-right($offset: percentage(1/12)) { | ||
@mixin grid-offset-right($offset: percentage(1/$grid-column-count)) { |
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.
Could the default $offset:
just be 1
on lines 42
and 46
? Because the percentage($number / $grid-column-count)
is already getting applied via convertify($offset)
?
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.
Yeah, since that's the expected behaviour when you're using it
shared/styles/mixins.scss
Outdated
@include reset-heading; | ||
@include responsive-font($min, $max); | ||
|
||
@warn 'Please implement for project'; |
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.
What does implement for project
mean?
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.
These three mixins are included for those that want them. They have some settings that need to be changed for the project you're using them for, so this should trigger you to change them. But the wording is bad.
Please set values in this mixin for your project.
?
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.
Hmmm, are these really that different than any other piece of the starter kit? Anything could be customized for a project if it needs to be, right?
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.
True, but these values are arbitrary, like the 58
for margin, other values are based on $gutter
or have some logic behind them.
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.
It doesn't have to be arbitrary, it could be based off something. Maybe even ($gutter * 2)
; or some other new variable.
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.
@k80 @osk i think if we add a variable there it could be mistaken for an integral non-editable part of the mixin though. an arbitrary value might look a bit messy, but at least it indicates a value you can edit? maybe we could have warnings in there to update those values and just have some kind of obvious placeholder value?
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.
123456789px
would be obvious… and totally break the design.
shared/styles/mixins.scss
Outdated
@@ -83,17 +97,69 @@ | |||
padding: 0 $container-gutter-mobile; |
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.
Should this also be long hand?
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.
Hmm, I'm not sure. Is there a case where we need to explicitly force it to be 0
? @organdonor47 @mdmagnusson ?
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.
shared/styles/mixins.scss
Outdated
font-family: $font-family; | ||
font-weight: normal; | ||
letter-spacing: 0; | ||
line-height: (58/52); |
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.
Is this /52
supposed to be /$max
? It is in the other 2.
grid-offset-* default value 1 instead of 1/$grid-column-count container mixin uses padding longhand heading, subheading and copy mixins don't warn, just have explicitly arbitrary values
…t-universally into feature/scss-changes
@k80 @organdonor47 |
I'm merging this later today if there are no objections |
i think there is probably a more sensible solution to this down the line, but this is as good as any other alternative I can think of! |
Changes to default Sass:
viewport
mixin via@warn
$min-mobile
breakpoint to 420 from 480$page-width
to1290px
grid-col
etc