Skip to content

Conversation

@mdo
Copy link
Contributor

@mdo mdo commented Sep 11, 2015

This is a heavily WIP effort to rewrite large chunks of Primer as part of a major update.

Summary

The goal here is to rewrite several components for simpler styling, reduce specificity of selectors, reduce overrides elsewhere in GitHub's CSS, and more.

Changelog

  • Rewrote alerts to remove chaining and make use of classes over elements.
  • Update button group styles to allow for single-buttons (useful when you have buttons being shown and hidden).
  • Overhaul margins on headings and paragraphs to greatly reduce our use of margin-top and margin-bottom overrides in github/github. (This won't affect our Markdown styles as those are scoped under a parent class and override this all.)
  • Rewrite form controls to remove input and attribute selectors for classes. Reduces our selector count, simplifies rules elsewhere, and reduces specificity.
  • Rearrange files to break things down by component more, allowing for greater customization and easier maintenance moving forward.
  • Rewrite blankslate to reduce use of chained classes and simplify styles.
  • Add margin utilities to reduce highly repetitive declarations and properties.

Todo

Additional changes still to be determined.

  • Finalize blankslate changes (see commented out CSS there)
  • Additional custom form elements

/cc @jonrohan @josh @aroben

mdo and others added 15 commits September 10, 2015 17:56
…use of non-markdown bodies of text elsewhere
- Remove the element and attribute selectors to reduce specificity elsewhere
- Use a singular class for all text inputs, textareas, and selects (.form-control)
- Update modifier classes to use .input-*
- More consisitent modifier classes now available (no more element prefixes in selectors, .input-mini is now .input-sm, .input-large is now .input-lg)
- Port some additional styling to custom .select controls since we're not longer styling the default select element with the move to a class
- Break apart buttons and forms files a bit for granularity
- Move entire utility file to the end of the import stack (should always be there for specificity reasons)
@mdo mdo added docs labels Sep 11, 2015
@mdo mdo added this to the v3.0.0 milestone Sep 11, 2015

Choose a reason for hiding this comment

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

Merge rule .form-control + .btn with rule on line 4

This was referenced Sep 11, 2015

Choose a reason for hiding this comment

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

Colon after property should be followed by one space

}

&.warn {
dd.warning {

Choose a reason for hiding this comment

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

Avoid qualifying class selectors with an element.

@jonrohan
Copy link
Member

This pull feels like it's in a pretty good place now. Here's what I want to do. Merge it into master, (but not tag the new version yet)

I need to create a pull on github/github https://github.com/github/github/pull/51212 that pulls in the master branch here and uses it to make updates to the .com codebase. When I get everything fixed and shipped there. I'll come back and tag the new version 3.0.0.

jonrohan added a commit that referenced this pull request Mar 14, 2016
@jonrohan jonrohan merged commit 19fd820 into master Mar 14, 2016
@jonrohan jonrohan deleted the v3 branch March 14, 2016 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants