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

Reudced selector specificity. New form and list defaults. #348

Merged
merged 12 commits into from
Mar 12, 2015

Conversation

cshold
Copy link
Contributor

@cshold cshold commented Mar 10, 2015

Form selectors:

  • The form selectors are too specific right now. Using input[type="XXXX"] means a single class won't override it.
  • By moving to simply input, we can style all inputs the same and override them with classes whe needed.
  • radio and checkbox styles are overwritten on the element level
  • input[type="image"] is overwritten on the element-level.
    • This comes up with additional_checkout_buttons (PayPal especially_

Lists

  • Allow list styles to be applied in RTE too

Updated templates:

  • Updated various ul elements to include no-bullets class
  • Updated customer templates to make forms vertical, rather than default horizontal

@stevebosworth @mpiotrowicz

input[type="number"],
input[type="tel"],
input[type="url"],
input,
Copy link
Contributor

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 be this opinionated about form input styling by default. There was a good discussion about this in FED slack earlier today, but by styling form elements directly, if you want to create any variation within the theme for those elements, you'd need to undo all of these styles in that variant.

Copy link
Contributor

Choose a reason for hiding this comment

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

does timber as a base even need form styles out of the box? Presumably these are overwritten by each theme anyway?

Copy link
Contributor

Choose a reason for hiding this comment

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

... i still think this is too opinionated as a default? How would these be overwritten if a variant on an input was required? @cshold

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a step to reduce selector specificity, which I think it accomplishes. It's not perfect, so we'll revisit the reset vs base styles in another PR shortly.

@cshold cshold changed the title Further reudced some selector specificity Reudced selector specificity. New form and list defaults. Mar 11, 2015
@cshold cshold mentioned this pull request Mar 12, 2015
cshold added a commit that referenced this pull request Mar 12, 2015
Reudced selector specificity. New form and list defaults.
@cshold cshold merged commit 4926433 into master Mar 12, 2015
@cshold cshold deleted the input-selectors branch March 12, 2015 14:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants