Skip to content

Conversation

@mdo
Copy link
Member

@mdo mdo commented Mar 6, 2020

Screen Shot 2020-03-06 at 11 06 31 AM

Compared to v4, v5's docs have a fixed-width, center aligned container. I wanted to keep that look of a centered container, but add a third column to our docs for fitting in a sidebar table of contents. Lately, the ToC has been wildly unhelpful as the constant scrolling up and down to find a link isn't saving me anytime.

Getting that third column though means either sacrificing significant width from the content column, going fullscreen again (don't want to do), or adding a wider container. I chose the last option and rather than write CSS that limits an even wider container to just our docs, I'm adding it to the core.

Let the feedback rip!

Preview: https://deploy-preview-30354--twbs-bootstrap.netlify.com/

@mdo
Copy link
Member Author

mdo commented Mar 6, 2020

Right now this comes with the need to update documentation on the number of grid tiers, changing bundlesize, etc. It's a big increase, and not just motivated by adding a sidebar ToC—lots of folks have asked for a larger device tier.

Here are the issues and PRs I could find mentioning xxl.

Issues

PRs

@MartijnCuppens
Copy link
Member

I'm not 100% sure it's a good idea to add a new grid tier just because we need it for our docs. However we can dig up this idea (which i liked very much, see my I like this approach comment): #28500 and customize the grid breakpoints only for the docs.

I would also move the TOC next to the introduction, pages like the card documentation look a bit weird: https://deploy-preview-30354--twbs-bootstrap.netlify.com/docs/4.3/components/card/

image

@florianlacreuse
Copy link
Contributor

We already add some grid tiers in our projects. Therefore, I'm in favour of adding a new size.

My only concern is about the naming. Why xxl and not 2xl? In our case we will need a extra grid tier (for a 1540px container for instance), and in this case 3xl looks prettier (IMHO) than xxxl.

@ffoodd
Copy link
Member

ffoodd commented Mar 12, 2020

+1, we already added a -xxl tier in Boosted in v4 :)

@MartijnCuppens
Copy link
Member

Current bootstrap.min.css size: 21.32kb (gzip)
This PR bootstrap.min.css size: 22.15kb (gzip)

I don't really think this is a good idea. Containers will be 1320px which is way to big if you do not have any sidebars. Reading text will be like watching a tennis game.

@midzer
Copy link
Contributor

midzer commented Mar 12, 2020

Is it possible to write a function that extends our grid system?

Have current $grid-breakpoints and $container-max-widths as base and allow new variable $extra-grid-tiers: null to specify how many additional extra large tiers are generated on top of xl following scheme 2xl, 3xl etc as @florianlacreuse suggested.

@mdo mdo force-pushed the grid-xxl-and-sidebar-toc branch 3 times, most recently from 0f39e79 to 16ca417 Compare April 2, 2020 01:11
@mdo
Copy link
Member Author

mdo commented Apr 2, 2020

Wondering if we can get scrollspy to work with this table of contents nav. Thoughts @XhmikosR?

@mdo mdo force-pushed the grid-xxl-and-sidebar-toc branch from 345c192 to c9ea73d Compare April 2, 2020 18:46
@XhmikosR XhmikosR force-pushed the grid-xxl-and-sidebar-toc branch 2 times, most recently from cdbee3e to 4649195 Compare April 2, 2020 19:38
@XhmikosR
Copy link
Member

XhmikosR commented Apr 2, 2020

Wondering if we can get scrollspy to work with this table of contents nav. Thoughts @XhmikosR?

I remember I tried this in the past but I faced some issues with not being able to customize the ToC IDs.

Better split the ToC patches to a separate PR and we can discuss this further there 🙂

@mdo
Copy link
Member Author

mdo commented Apr 3, 2020

I’m still okay with shipping the general ToC updates here. With or without the scrollspy, this is still an improvement :).

@mdo mdo force-pushed the grid-xxl-and-sidebar-toc branch from 1112b5c to c42e9a4 Compare April 8, 2020 18:51
@MartijnCuppens
Copy link
Member

@mdo, thoughts on switching to 2xl like @midzer and @florianlacreuse suggest?

@mdo mdo force-pushed the grid-xxl-and-sidebar-toc branch from d1b7573 to e212a71 Compare April 9, 2020 17:53
@mdo
Copy link
Member Author

mdo commented Apr 9, 2020

thoughts on switching to 2xl like @midzer and @florianlacreuse suggest?

I think I'm inclined to keep it as xxl for the time being. We don't have much information on how folks have customized breakpoints to date, and I've only heard a few asks for a 2xl name that'd allow for even larger breakpoints.

@mdo mdo force-pushed the grid-xxl-and-sidebar-toc branch from e212a71 to 80f1abd Compare April 9, 2020 22:44
@mdo
Copy link
Member Author

mdo commented Apr 10, 2020

Any other reviews from @twbs/css-review or should I go ahead and merge? :)

@MartijnCuppens
Copy link
Member

Found some lg references in the docs and pushed some changes to fix #30354 (comment) gonna do a recheck one of these days

@mdo
Copy link
Member Author

mdo commented Apr 11, 2020

Good call @MartijnCuppens, just found some more fixes and pushed them as well.

mdo and others added 6 commits April 13, 2020 13:55
- Staring at my laptop, I realized I'm wasting away space. This adds a 
significant amount of CSS, but it feels right already.
- Added the xxl tier with a width that divides by 12
- Motivation was originally trying to have a third column for our toc so 
that our docs are more useful
- Breaks grid content across multiple pages
- Updates mentions of grid tiers from five to six
- Rewrites how it works sections to reference new options and tiers
@mdo mdo force-pushed the grid-xxl-and-sidebar-toc branch from bb20835 to b5dc2fb Compare April 13, 2020 21:04
@mdo
Copy link
Member Author

mdo commented Apr 13, 2020

Squashed the last several commits into one for updating docs across the board. Taking another spin through and then likely merging :D.

@mdo mdo force-pushed the grid-xxl-and-sidebar-toc branch from b5dc2fb to 07c8db2 Compare April 13, 2020 21:31
- Updates mentions of number and exact tiers
- Updates grid example to include xxl container
- Adds some scss-docs references
- Cleans up other grid mentions and docs
- Updates navbar example to include an expand at XXL variant
@mdo mdo force-pushed the grid-xxl-and-sidebar-toc branch from 07c8db2 to 7dedccf Compare April 13, 2020 21:41
@mdo mdo merged commit 789bcf6 into master Apr 14, 2020
@mdo mdo deleted the grid-xxl-and-sidebar-toc branch April 14, 2020 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants