847 points · by arechsteiner · 10y ago · 161 comments
(Moderators: Could you remove the #dropdown part from the URL please?)
Edit: The two post seem to have been merged by the moderators. Thanks!
But why, why, why, whyyyyyyy are you hijacking my back button, you evil person... please remove historystate, it's unnecessary for this site. Also, can you make the right/left arrow keys toggle between items in the preview box?
About the back button: Do other people feel the same way? This is by design, but I'm open to change this behavior if people would prefer it.
But if you've got some other keyboard navigation to go back / forward then maybe it wouldn't be so much of a loss...
Great site, it's what the official docs should be.
(I'm on my phone though so it's possible there's some alternate navigation on widescreen layouts that I'm not seeing).
For example, if I open two class popups, then hit the back button twice, I'd expect to end up on the overview page with no popup open, but what actually happens is the last popup stays up even while the URL changes.
The other case is, if I have a popup open, then close it, I'd expect the URL to change to having no fragment to reflect that, but instead the old fragment sticks, so a reload would actually show the last popup you had open.
These are obviously minor things and I like the project, so I hope not to come across too nitpicky.
That being said, this is really awesome work and will certainly come in handy! Nice job.
Don't change the url when people are clicking on the urls, but have a share icon for each element that is placed in the modal that pops up when clicking on it.
In this way, url stays the same while people are checking the elements, and you can still have specific urls for each element for people to point to a specific demo if they want.
Share icon copies the url e.g "http://hackerthemes.com/bootstrap-cheatsheet#dropdown-header... to clipboard and visiting this url pops up the dropdown-header demo.
I find the back button as you implemented it handy.
I might add it in the future though. It would be a nice feature really.
Once again though, nice work! :)
Feature request: When a component pane(code snippet + preview) is open, allow escape key to close the pane.
Is this code open source? Would be happy to submit a PR for this feature if it is.
Add a text field to filter the lists of lists. using something like typeaheadjs - https://github.com/twitter/typeahead.js/blob/master/doc/bloo...
What is your sense of file sizes under version 4 compared to version 3?
PS: for the sake of sharing http://bootswatch.com/
Having websites look and feel similar to other familiar sites is a good thing.
https://en.wikipedia.org/wiki/Bootstrap_(front-end_framework...
Select your elements with SASS and let this selector inherit the style of a Bootstrap class.
body > div > div {
@extend .col-xs-4;
}
But I never tried to use it that way.This might seem like an obvious thing to generate cleaner and more 'semantic' markup but you will end up with tight coupling all over the place. When you change anything in your layout you'll need to rewrite parts of your css, which is basically twice the effort. You'll just end up wasting your employers time and money.
If you want some deeper insight into why it's considered a bad philosophy, I highly recommend reading some articles by Harry Roberts.
Then again, some succesful professionals actually work this way, I know a few.
.home { .twitter-area { @include grid-column(4); } }
But personally I find that to be much more of a pain in the butt to come back to a couple of months later than just applying the column classes directly to elements.
But it somehow hurts to look at the markup later, with all the classes, etc.
@import 'bootstrap/variables';
@import 'bootstrap/normalize';
@import "bootstrap/mixins/clearfix";
@import "bootstrap/mixins/grid";
@import "bootstrap/mixins/grid-framework";
and then you can insert it: article {
@include make-sm-column(5);
@include make-sm-column-offset(1);
@include make-xs-column(6);
}I just found it faster to add the classes directly to the HTML.
But I will check how this would work with Babel+WebPack+React in the future.
I can import SASS files in JS, but they would have to be merged with the Bootstrap SASS etc.
I don't see the problem.
Just searched for "semantic name" and found this article from 2011 that explain the subject quite well: https://css-tricks.com/semantic-class-names/
> "Moved from Less to Sass. Bootstrap now compiles faster than ever thanks to Libsass, and we join an increasingly large community of Sass developers."
Let me know if I should update to Bootstrap 4 and continue development. Feedback is welcome!
I don't see the point of supporting something that's in alpha– it's just going to change, and people shouldn't be using it yet.
Nice work!
I really want the flexbox support.
Many of the "API" changes in Bootstrap 4 are subtle class name differences, like using pull-<size>-right vs pull-right. I think your interactive examples are a lot more helpful for seeing this quickly vs. the official docs (and the official docs are pretty good too).
Last night I stumbled upon the most interesting comment about static sites from an engineer at Netflix:
> When I was heading up reliability at Netflix, we considered, and even began evaluating, turing the whole thing into one big static site. Each user had a custom listing, but generating 60+ million static sites is a very parallelizeable problem.
> At the time, the recommendations only updated once a day, but an active user would have to dynamically load that content repeatedly, and at the same time, the recs were getting updated for users who hadn't visited that day. By switching to static, we could generate a new static site for you every time you watched something (which could change your recommendations), and increase reliability at the same time, so it would have been a much better customer experience. Unfortunately we couldn't get enough of the frontend engineers to buy into the idea to get it off the ground, and also they were already well along the path to having a data pipeline fast enough to update recs in real time.
A nice idea and execution. Bookmarked!
Does versions of Bootstrap 2 and 3 exists or are planned?
I think Bootstrap 4's documentation is even harder to navigate than Bootstrap 3's. It's very frustrating, but this cheat sheet will help a lot.
In any case I would have to do some refactoring before feeling comfortable releasing the source code up for people to examine :-)
https://github.com/arechsteiner?tab=repositories
I think he may need help grokking the whole concept :-)
The url is kind of hard to remember.
links from each section to the official docs on that element would be awfully nice.