parlaywithme / pweb

http://parlaywith.me
0 stars 0 forks source link

clean up CSS #7

Closed jimjshields closed 9 years ago

jimjshields commented 10 years ago

Get rid of unnecessary code and consolidate any identical styling that applies to multiple elements.

I was thinking the best way to consolidate is to use classes to define identical styling across the site (e.g., .green-text would be used anywhere you want green text). Do you think that's the best way to do it or is there a better way?

lorensr commented 10 years ago

http://brettjankord.com/2013/02/09/thoughts-on-semantic-html-class-names-and-maintainability/

green-text would work well as a sass mixin (or stylus, which is what the parlay app uses), but for the website, since it's plain css, I guess the closest would be

h2, a, .card { color: green; }

.card { Other styles }

On Monday, November 24, 2014, jimjshields notifications@github.com wrote:

Get rid of unnecessary code and consolidate any identical styling that applies to multiple elements.

I was thinking the best way to consolidate is to use classes to define identical styling across the site (e.g., .green-text would be used anywhere you want green text). Do you think that's the best way to do it or is there a better way?

— Reply to this email directly or view it on GitHub https://github.com/parlaywithme/pweb/issues/7.

lorensr commented 10 years ago

Alternatively, it looks like there is a stylus plug-in for Jekyll. So if you'd prefer, you could switch to that

On Monday, November 24, 2014, Loren Sands-Ramshaw lorensr@gmail.com wrote:

http://brettjankord.com/2013/02/09/thoughts-on-semantic-html-class-names-and-maintainability/

green-text would work well as a sass mixin (or stylus, which is what the parlay app uses), but for the website, since it's plain css, I guess the closest would be

h2, a, .card { color: green; }

.card { Other styles }

On Monday, November 24, 2014, jimjshields <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

Get rid of unnecessary code and consolidate any identical styling that applies to multiple elements.

I was thinking the best way to consolidate is to use classes to define identical styling across the site (e.g., .green-text would be used anywhere you want green text). Do you think that's the best way to do it or is there a better way?

— Reply to this email directly or view it on GitHub https://github.com/parlaywithme/pweb/issues/7.

lorensr commented 10 years ago

Actually, in this case for stylus I would actually do

green = #f00

h1 { color green font-size 16px }

.card { color green ... }

rather than a mixin, since the mixin would only have a single statement

On Monday, November 24, 2014, Loren Sands-Ramshaw lorensr@gmail.com wrote:

Alternatively, it looks like there is a stylus plug-in for Jekyll. So if you'd prefer, you could switch to that

On Monday, November 24, 2014, Loren Sands-Ramshaw <lorensr@gmail.com javascript:_e(%7B%7D,'cvml','lorensr@gmail.com');> wrote:

http://brettjankord.com/2013/02/09/thoughts-on-semantic-html-class-names-and-maintainability/

green-text would work well as a sass mixin (or stylus, which is what the parlay app uses), but for the website, since it's plain css, I guess the closest would be

h2, a, .card { color: green; }

.card { Other styles }

On Monday, November 24, 2014, jimjshields notifications@github.com wrote:

Get rid of unnecessary code and consolidate any identical styling that applies to multiple elements.

I was thinking the best way to consolidate is to use classes to define identical styling across the site (e.g., .green-text would be used anywhere you want green text). Do you think that's the best way to do it or is there a better way?

— Reply to this email directly or view it on GitHub https://github.com/parlaywithme/pweb/issues/7.

jimjshields commented 10 years ago

Ok cool, that's helpful. I'll look into Stylus, seems simple enough.