-
Notifications
You must be signed in to change notification settings - Fork 25.8k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
The effect of varying the width of Browser Window #384
Comments
To start I'd suggest you fire up the web developer tools in whatever browser you're using. This will allow you to inspect any element on the page to get a class name and CSS declarations. Once you do that it's a lot easier to see what's going on. Essentially the content is wrapped in a div Inside of that is the
The CSS for these are mostly in .page {
@include breakpoint($large) {
@include span(10 of 12 last);
@include prefix(0.5 of 12);
@include suffix(2 of 12);
}
.page__inner-wrap {
@include full();
.page__content,
.page__meta,
.page__share {
@include full();
}
}
} Any of these values can be changed you'll just have to make sure they add up to 12 or else things will break and not line-up. Susy is really powerful so I'd suggest you read their docs to fully understand what's going on and how to use the mixins. Also I'll add one more tidbit. The Susy mixins .page {
width: 83.05085%;
float: right;
margin-right: 0;
padding-left: 4.23729%;
padding-right: 16.94915%;
} If you're finding it hard to align things with percentages you can change $susy: (
columns: 12,
// column-width: 90px,
gutters: 1/4,
math: fluid,
output: float,
gutter-position: after,
container: $large,
global-box-sizing: border-box,
// debug: (
// image: show,
// color: blue,
// output: overlay,
// toggle: top right,
// ),
); |
Good morning Michael, If you examine the metrics pane on this captured image you will see that the padding-right of Therefore If I am right MY problem is how to disable or reduce that padding-right margin, right ? How is that related with the columns of sussy framework ? Do I have to make changes in more that one files, e.g. _page.scss to fix that ? You also mentioned that div #main has a max width of 1024 - 1280px. In fact this is the point I started experimenting with the breakpoints section of _variables.scss file. $small : 768px;
$medium : 900px;
$medium-wide : 1024px;
$large : 1280px;
$x-large : 1900px; In my opinion these changes improved the appearance, especially on large screens. |
Here's the logic.
This is done to "visually center" it so things look more pleasing if the sidebar is disabled. It also helps reduce the line-length of the text which is good for readability. Long lines of text are harder to read as the eye can have problems tracking position. It is a good rule of thumb to limit characters to around 60-70 for a better experience. The how.
.page { You can change any of those values to get the widths you want. The keyword If you read through Susy's documentation it will all make much more sense. There really is no magic to Susy. It's just a bunch of math, which is easier to write than trying to figure out a bunch of percentages that add up to 100%. |
Super, your explanation make things far more clear regarding to the way you applied Sussy magic to your theme ;-) Indeed, in order to increase or decrease the padding-right (larger green box on the right) you may vary the In your previous comment you also mentioned that:
Could you please also clarify what are the elements and their corresponding column values that they add up to 12, the size of |
Sure.
container: $large
It also has a 12 column grid applied to it. If you turned on the debugger in Susy you'd see 12 blue columns across that container. These are the 12 that I use to align and size the If I simplify the CSS you essentially have this: a 2 column sidebar and a 10 column page declared with the .sidebar {
@include span(2 of 12);
}
.page {
@include span(10 of 12 last);
} The If for example you wanted to make the sidebar even thinner you could do: .sidebar {
@include span(1 of 12);
}
.page {
@include span(11 of 12 last);
} Being mindful to add up to 12 so the math works out. 1 + 11 = 12. |
Closing as I believe I've addressed and answered the question. If that's not the case feel free to re-open the issue. |
See #2093 |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
bundle update
.bundle exec jekyll build
.Environment Information
github-pages
orjekyll
gem version: 3.1.6Hi Michael,
I have studied a bit a similar issue that was posted almost two years ago and then discussed again recently. In one of your comments there you mentioned that "you are working on a complete rewrite of the theme which should make customizing things a bit easier". This is version 3.2.10 of the theme, therefore I decided to open a new issue and ask a similar question.
This is a 1275x684 image captured from my Browser. My desktop background can be seen at the vertical edges of the image. You can measure the left and right margin of the images grid using a screen ruler and find that it is 2x120pixels = 240pixels. The total length of the browser window is about 1240pixes wide and therefore subtracting the margins we are left with a content area width of about 1000pixels.
My question is what are the theme files I should modify and where exactly to increase the content area width, i.e. decrease the left and right margin of the browser window ?
To make things a bit more interesting, let us put in the game the sidebar.
The width of the image captured from my Browser is the same and the width of the browser window has not been modified. If we measure again the right margin from the edge of the browser window, we find that it is 300 pixels ! I am not sure what is the width of the sidebar, it will be nice to help me put a background color, but If I measure from the point the social media images start I get 120pixels. This is the same margin I had without the side bar.
This indicates that somehow when you add the sidebar, the width of the content area is shrinked because the right margin has been increased ! How is it possible to fix the right margin, e.g. 120 pixels in this example ?
You may also consider that If you experiment with even larger sizes of a browser window, e.g. 1900px then you get a right margin of about 520px wide and a left margin of about 300px !
Thanks in advance for any effort to solve that problem and to answer my question.
PS: I think you will greatly assist your users if you can write some documentation on how you applied Susy responsive framework, especially how do you modify width of content area and sidebar and how is that affected by changing the width of the browser window ?
The text was updated successfully, but these errors were encountered: