Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor global CSS #803

Closed
flekschas opened this issue Dec 4, 2015 · 3 comments
Closed

Refactor global CSS #803

flekschas opened this issue Dec 4, 2015 · 3 comments

Comments

@flekschas
Copy link
Member

I notice that the search bar on the dashboard has a weird margin. It turned out to be caused by a global CSS rule.

Global CSS rules are very dangerous because they will effect everything across the whole page. It's often better to write class-based CSS rules and append classes to the elements that need it. The classes themselves can be pretty generic though.

In this case I am talking about: 88f36c6

input[type="text"], select{
  display: inline-block;
  height: 20px;
  line-height: 20px;
  padding: 4px 6px;
  margin-bottom: 10px;
  font-size: 14px;
  border-radius: 3px;
  vertical-align: middle;
  width: 220px;
  border: 1px solid #ccc;
  background-color: #fff;
}

I would suggest transforming this into a class like so:

.myFancyInput {
  display: inline-block;
  height: 20px;
  line-height: 20px;
  padding: 4px 6px;
  margin-bottom: 10px;
  font-size: 14px;
  border-radius: 3px;
  vertical-align: middle;
  width: 220px;
  border: 1px solid #ccc;
  background-color: #fff;
}

I would quickly do this myself but unfortunately I don't know which element actually needs this styling.

Just as a reference here's the related commit: 88f36c6

@jkmarx
Copy link
Member

jkmarx commented Dec 5, 2015

These globals were added to offset the bootstrap3 css changes. The defaults should match bootstrap2 globals css. We can discuss more in the dev meeting as there will need to be a more uniform styling applied in general.

@flekschas
Copy link
Member Author

Are all those commits related to global CSS rules?

@jkmarx
Copy link
Member

jkmarx commented Dec 14, 2015

Yes, they were related to this issue. That's why there were Referenced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants