Skip to content
This repository has been archived by the owner on Apr 30, 2020. It is now read-only.

Mobile-first version of Pure's Website #183

Merged
merged 58 commits into from Jan 21, 2014

Conversation

tilomitra
Copy link
Contributor

This pull request is overhauls the site's CSS to be mobile-first, in accordance with the new mobile-first responsive grid system that we are building out. This pull request is closely tied to the work that I've been doing in the Pure repo in PR #267. That's the version of Pure that I've tested this stuff against.

What's Changed

  • main.css is now mobile-first, using min-width instead of max-width. The biggest change here is that the slide-out menu is now coded in a mobile-first way.
  • Created a Gruntfile.js which generates the media queries for a mobile-first grid by using rework-pure-grids.
  • I'm in the process of removing all pure-g-r from the site. This is not needed anymore in the mobile-first grid. All instances of pure-g-r have been replaced with their mobile-first counterpart. Still need to remove pure-g-r from layouts though.

What's left to be done

tilomitra and others added 21 commits December 23, 2013 16:39
This Gruntfile generates the responsive grid needed for the Pure Site
via rework-pure-grids.

As of this commit, we need to fix
pure-css/rework-pure-grids#6 so until we do that,
you have to manually remove the non-media query rules from the outputted
CSS.
Updated the grid that we generate based on the needs of grid doc.
This commit updates the Grids documentation with the following:

* How to generate a mobile-first grid
* How to use rework-pure-grids
* Examples
* Removal of partials/examples that don't apply anymore
This is temporary, until @jtangelder publishes the latest grunt-stripmq
on npm. The latest has the css-mediaquery dependency.
Added build/ dir and setup things to aid deployment
<div class="l-box">
<a href="{{pathTo 'layouts'}}">
<img src="img/layout-icon.jpg" alt="Diagram of a sample layout.">
<img src="img/layout-icon.jpg" class="img-responsive" alt="Diagram of a sample layout.">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should add this classname to Pure. pure-css/pure#267 (comment) Can we just add this into pure-site's main.css for now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be in Pure. It's a pretty fundamental class. I agree with the other comment thread in that it should be renamed to pure-img-responsive. I don't think we should expect people to add this into their main.css because a responsive framework needs to deal with responsive images.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Sounds fine, but let's not let that simple style rule block this PR. We can temporarily add it to pure-site's main.css until the next version of Pure is released and call it dogfood 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah, we can totally add it in main.css for now so that this PR is completely decoupled from any Pure PR. 😃

@ericf
Copy link
Collaborator

ericf commented Jan 9, 2014

Optional: I think it would be nice to have a web UI for rework-pure-grids that is built into the Pure website, but this can be a v2. It would be nice to have routing set up to some useful pre-created grids.

I think this can be removed from the Todos since we decided against trying to cram that into this PR.

Merge pure-css/pure#267 into Pure when merging this in.

I don't think is is required now either for this PR. I do however think we need to time this task with the revamp of the Grids UI.

@tilomitra
Copy link
Contributor Author

Thanks @ericf. I removed those from the TODOs. Just the layouts left!

@ericf
Copy link
Collaborator

ericf commented Jan 14, 2014

@tilomitra This stuff is looking pretty good!

I still think there's room for lots of improvement in the CSS breakpoints used on the site and in the layouts. It seems like most layouts use the main grid units used by the website; I think the layouts should probably all be freed from that and have their own layouts and break points.

Do you want me to take a stab at refining the breakpoints used by the layouts?

@ericf
Copy link
Collaborator

ericf commented Jan 14, 2014

I'm not sure the new colors on the blog layout are an improvement. If you really like them, then can you take a new screenshot? Or can you put the colors back to how they were before?

@tilomitra
Copy link
Contributor Author

@ericf I found the default grid worked pretty well with the existing layouts. I didn't feel tied down to it, but feel free to take a stab if you think the media queries can be improved!

Re. blog colors, I wasn't a big fan of the old purple/blue color scheme, but if you don't like the current one, I'll take another pass at it.

@ericf
Copy link
Collaborator

ericf commented Jan 14, 2014

Re. blog colors, I wasn't a big fan of the old purple/blue color scheme, but if you don't like the current one, I'll take another pass at it.

Cool, either way, let's get the screenshot in sync with whatever you decided for the colors.

@tilomitra
Copy link
Contributor Author

@ericf Hopefully you like this new color scheme more! Updated the image too.
blog 2x

@ericf
Copy link
Collaborator

ericf commented Jan 14, 2014

@tilomitra yeah looks good!

I have a ton of really good stuff happening to the site's CSS 😄 I can't finish it tonight, but I will in the morning—all awesome mobile/content-first tweaks.

tilomitra added a commit that referenced this pull request Jan 21, 2014
Mobile-first version of Pure's Website
@tilomitra tilomitra merged commit 2c93b4c into pure-css:master Jan 21, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants