![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I have an asp.net web application which uses mostly the same styles on each page (probably 90% of the pages use the same basic styles) but some pages are differently styled so have many styles unique to that page. At the moment, almost all of the CSS is in a single external stylesheet but that means it's cluttered up with a lot of styles that are only used in one page. it can also cause maintenance headaches because it's easy for a style to get "orphaned" when the only page using it gets changed or removed so putting page-specific styles inside a <style> tag in the ASPX page does have it's advantages, but it means that someone wishing to change the look and feel of the application would have to edit ASPX files which is not a great idea either - it's a big maintenance headache when that customer wants to upgrade i have thought of having a page-specific css file for each page that needs it, but this would create lots of separate css files which again could turn into a maintenance problem I guess there's no simple solution to this one but wondered if any of you guys had some general guidelines about how to manage such styles |
#3
| |||
| |||
|
|
At the moment, almost all of the CSS is in a single external stylesheet but that means it's cluttered up with a lot of styles that are only used in one page. |
#4
| |||
| |||
|
|
Hi, I have an asp.net web application which uses mostly the same styles on each page (probably 90% of the pages use the same basic styles) but some pages are differently styled so have many styles unique to that page. At the moment, almost all of the CSS is in a single external stylesheet but that means it's cluttered up with a lot of styles that are only used in one page. it can also cause maintenance headaches because it's easy for a style to get "orphaned" when the only page using it gets changed or removed so putting page-specific styles inside a <style> tag in the ASPX page does have it's advantages, but it means that someone wishing to change the look and feel of the application would have to edit ASPX files which is not a great idea either - it's a big maintenance headache when that customer wants to upgrade i have thought of having a page-specific css file for each page that needs it, but this would create lots of separate css files which again could turn into a maintenance problem I guess there's no simple solution to this one but wondered if any of you guys had some general guidelines about how to manage such styles |
#5
| |||
| |||
|
|
Hi, I have an asp.net web application which uses mostly the same styles on each page (probably 90% of the pages use the same basic styles) but some pages are differently styled so have many styles unique to that page. At the moment, almost all of the CSS is in a single external stylesheet but that means it's cluttered up with a lot of styles that are only used in one page. it can also cause maintenance headaches because it's easy for a style to get "orphaned" when the only page using it gets changed or removed so putting page-specific styles inside a <style> tag in the ASPX page does have it's advantages, but it means that someone wishing to change the look and feel of the application would have to edit ASPX files which is not a great idea either - it's a big maintenance headache when that customer wants to upgrade |
|
i have thought of having a page-specific css file for each page that needs it, but this would create lots of separate css files which again could turn into a maintenance problem I guess there's no simple solution to this one but wondered if any of you guys had some general guidelines about how to manage such styles |
#6
| |||
| |||
|
|
A helpful tool for identifying orphaned styles is the Dust-Me Selectors extension for Firefox http://www.sitepoint.com/dustmeselectors/ |
#7
| |||
| |||
|
|
Hi, I have an asp.net web application which uses mostly the same styles on each page (probably 90% of the pages use the same basic styles) but some pages are differently styled so have many styles unique to that page. |
|
At the moment, almost all of the CSS is in a single external stylesheet but that means it's cluttered up with a lot of styles that are only used in one page. it can also cause maintenance headaches because it's easy for a style to get "orphaned" when the only page using it gets changed or removed so putting page-specific styles inside a <style> tag in the ASPX page does have it's advantages, but it means that someone wishing to change the look and feel of the application would have to edit ASPX files which is not a great idea either - it's a big maintenance headache when that customer wants to upgrade i have thought of having a page-specific css file for each page that needs it, but this would create lots of separate css files which again could turn into a maintenance problem I guess there's no simple solution to this one but wondered if any of you guys had some general guidelines about how to manage such styles |
#8
| |||
| |||
|
|
Andy Fish wrote: Hi, I have an asp.net web application which uses mostly the same styles on each page (probably 90% of the pages use the same basic styles) but some pages are differently styled so have many styles unique to that page. At the moment, almost all of the CSS is in a single external stylesheet but that means it's cluttered up with a lot of styles that are only used in one page. it can also cause maintenance headaches because it's easy for a style to get "orphaned" when the only page using it gets changed or removed so putting page-specific styles inside a <style> tag in the ASPX page does have it's advantages, but it means that someone wishing to change the look and feel of the application would have to edit ASPX files which is not a great idea either - it's a big maintenance headache when that customer wants to upgrade I think that normally the kind of page-specific styles you're describing are disjointed from the look and feel created in the main external stylesheet and are immune to revision during redesigns. If part or all of the style you want to apply relates to the look and feel, then perhaps what you need is to define a class with a name that's more general than the particular use to which you'd put it on any given page but that you can apply equally well on all the pages where you need it. If you want to style an element in a way that partly incorporates components of the site's design and is partly independent of the site's look and feel, then you can apply two classes to the element, one being the general one covered in the external sheet and the other being a page-specific one covered in a STYLE element. i have thought of having a page-specific css file for each page that needs it, but this would create lots of separate css files which again could turn into a maintenance problem I guess there's no simple solution to this one but wondered if any of you guys had some general guidelines about how to manage such styles |
![]() |
| Thread Tools | |
| Display Modes | |
| |