473,805 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Comparing stylesheets

I've got a 50k main.css file that's referenced by a load of sites.
Each of these sites also has a site.css file that modifies certain
styles defined in main.css. Changing the colour of borders, boxes etc,
as well as defining certain site specific styles. site.css is small
and easy to understand, and the only bit that can be edited by the
masses.

That's the theory. The practice is that there are now 4 sites going
live
in a week where some muppet who claims to understand css has just
copied
main.css in chunks, renamed it site.css, tweaked some bits and added
more, without deleting the inherited styles (*nice full explanation
below). It all works fine, but it means each site's site.css is now
about 60k, when it's meant to be nice and neat and about 10/20k.

So, to the question:
What tools do people out there use that could help me? Is there any
tool that can compare declarations across multiple stylesheets to
prevent me from sitting down and laboriously going through every style
declaration in site.css to check if it's redundant or not? 4 times
over? I've had a look at Topstyle and it doesn't seem to perform this
function, which I find surprising. Am I being stupid?

diff/sed/awk etc aren't options, btw...(I ain't a unix god)


*Crystal clear explanation:
in main.css there is this statement:

A.backtotop:lin k, A.backtotop:vis ited {
float:right;
margin-top:5px;
margin-right:10px;
margin-left:7px;
padding-left:10px;
font-size:70%;
color:#fff;
background:url( arrow_white_up. gif) 0 0.6em no-repeat;
}
A.backtotop:hov er {color:#fff;}
In site.css there is this statement:

A.backtotop:lin k, A.backtotop:vis ited {
float:right;
margin-top:5px;
margin-right:0;
margin-left:7px;
padding-left:10px;
font-size:70%;
text-decoration:none ;
color:#000;
background:url( arrow_black_up. gif) 0 0.6em no-repeat;
}
A.backtotop:hov er {text-decoration:unde rline; }
site.css doesn't need those duplicate declarations, so that the
declaration in site.css *should* read:

A.backtotop:lin k, A.backtotop:vis ited {
margin-right:0;
text-decoration:none ;
color:#000;
background:url( arrow_black_up. gif) 0 0.6em no-repeat;
}
A.backtotop:hov er {text-decoration:unde rline; }
But, like, there's 240k of this stuff...
Jul 21 '05
25 2234
da********@yaho o.co.uk (David) writes:
"Harlan Messinger" <h.*********@co mcast.net> wrote:

[back to top links]
As a user, have you ever used one of them?


Yes, frequently.


Yeah, I agree. Use them all the time and find them quite useful.
Especially useful when using lynx/links,


Really? In those browsers I find it far quicker to hit home on the
keyboard than to press up/down a few times to get to the back to top
link and then press return.

--
Chris
Jul 21 '05 #21
Neal <ne*****@yahoo. com> wrote:
On 19 Oct 2004 16:43:25 -0700, David <da********@yah oo.co.uk> wrote:
Neal <ne*****@yahoo. com> wrote in message
news:<op******* *******@news.in dividual.net>.. .
_Go to top_

Now, I'm thinking this link will merely bring me to the starting point I
was at up the page a bit, which as far as I knew was the top. In fact,
it
will bring me to a region of the page I don't even know existed.

Yes. "top of page" would be more descriptive link text.


But that still doesn't avoid the problem that as far as I knew, I was
already at the top of the page. Why click it? I just read what was there.


These links are especially useful on pages that begin with a large
number down-links. FAQs, for example. They simplify the pattern of
jumping down to one piece of information of interest and then
returning to the list of links.

Best to use content-related link text rather than position-related.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 21 '05 #22
Chris Morris <c.********@dur ham.ac.uk> wrote in message news:<87******* *****@dinopsis. dur.ac.uk>...

Yeah, I agree. Use them all the time and find them quite useful.
Especially useful when using lynx/links,


Really? In those browsers I find it far quicker to hit home on the
keyboard than to press up/down a few times to get to the back to top
link and then press return.

You know, I can honestly say that until I read this thread, I had *no
idea* that the home button took you to the top of a page. I've been
building websites since 1996.

<makes sudden mental leap />

....and the end button takes you to the bottom! Excellent.

<repeatedly mashes head into desk />
Jul 21 '05 #23
On Wed, 20 Oct 2004 07:34:00 -0400, Harlan Messinger
<hm************ *******@comcast .net> wrote:
Neal <ne*****@yahoo. com> wrote:
Yes. "top of page" would be more descriptive link text.


But that still doesn't avoid the problem that as far as I knew, I was
already at the top of the page. Why click it? I just read what was
there.


These links are especially useful on pages that begin with a large
number down-links. FAQs, for example. They simplify the pattern of
jumping down to one piece of information of interest and then
returning to the list of links.


Yes, but we're not arguing about the same thing. The link is a good idea.
Calling it "top" is not. It's the link text "top" that is ambiguous. As I
said,
Best to use content-related link text rather than position-related.


Name the link for the content it brings you to, not the geographical place
it goes. All goes back to not mentioning the mechanics, semantics, good
link text, etc.
Jul 21 '05 #24

"David" <da********@yah oo.co.uk> wrote in message
news:99******** *************** ***@posting.goo gle.com...
Chris Morris <c.********@dur ham.ac.uk> wrote in message

news:<87******* *****@dinopsis. dur.ac.uk>...

Yeah, I agree. Use them all the time and find them quite useful.
Especially useful when using lynx/links,


Really? In those browsers I find it far quicker to hit home on the
keyboard than to press up/down a few times to get to the back to top
link and then press return.

You know, I can honestly say that until I read this thread, I had *no
idea* that the home button took you to the top of a page. I've been
building websites since 1996.

<makes sudden mental leap />

...and the end button takes you to the bottom! Excellent.

<repeatedly mashes head into desk />


Except that I can't figure out how to get the keys to work consistently in
Firefox. I know, RTFM, but I haven't done that yet.

Jul 21 '05 #25
David wrote;
Chris Morris:

Yeah, I agree. Use them all the time and find them quite useful.
Especially useful when using lynx/links,
Really? In those browsers I find it far quicker to hit home on the
keyboard than to press up/down a few times to get to the back to top
link and then press return.

You know, I can honestly say that until I read this thread, I had *no
idea* that the home button took you to the top of a page. I've been
building websites since 1996.


That is your problem - you have been testing in lynx, but not
really using it. Just like Chris, who haven't enabled quick go etc
function to follow link using numbers, instead of using clumsy arrows...
(makes lynx usability better than opera)
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Jul 21 '05 #26

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4072
by: jason baumunk | last post by:
I author applications in php which use external stylesheets. When viewed through ie 6, netscape 6, et al. occassionally the stylesheets will not load or be applied. Has anybody encountered this and found a fix/workaround so that the stylesheets are verified as having been loaded/applied? I'm running apache and the external stylesheets are actually php files that serve dynamic stylesheets(ie, site.css.php......I don't suspect that this...
13
2106
by: Toby A Inkster | last post by:
www.authoring.stylesheets] For ages I have provided links to alternate stylesheets from my pages as per W3C recommendations: <link rel="stylesheet" href="baz" type="text/css" title="Baz" media="screen,projection" /> <link rel="alternate stylesheet" href="foo" type="text/css" title="Foo" media="screen,projection" /> <link rel="alternate stylesheet" href="bar" type="text/css" title="Bar"
6
2517
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/newsgroup-faq Posting-Frequency: twice a week (mondays and thursdays) Last-modified: March 10, 2001 Version: 1.95 URL: http://css.nu/faq/ciwas-mFAQ.html Maintainer: Jan Roland Eriksson <rex@css.nu> comp.infosystems.www.authoring.stylesheets FAQ v1.95 ______________________________________________________________________
2
2770
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/newsgroup-faq Posting-Frequency: once a week Last-modified: 2004-07-26 Version: 2.00 URL: <http://css.nu/faq/ciwas-mFAQ.html> Maintainer: Jan Roland Eriksson <rex@css.nu> comp.infosystems.www.authoring.stylesheets meta-FAQ v2.00 _______________________________________________________________________
0
1657
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/newsgroup-faq Posting-Frequency: once a week Last-modified: 2004-07-26 Version: 2.00 URL: <http://css.nu/faq/ciwas-mFAQ.html> Maintainer: Jan Roland Eriksson <rex@css.nu> comp.infosystems.www.authoring.stylesheets meta-FAQ v2.00 _______________________________________________________________________
0
2103
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/newsgroup-faq Posting-Frequency: once a week Last-modified: 2004-07-26 Version: 2.00 URL: <http://css.nu/faq/ciwas-mFAQ.html> Maintainer: Jan Roland Eriksson <rex@css.nu> comp.infosystems.www.authoring.stylesheets meta-FAQ v2.00 _______________________________________________________________________
2
2013
by: Mr X | last post by:
I'm a few weeks new to JS, and am having a problem. I have a simple INTERNAL style in a web page and I know that style is working. The problem arises when I try to run a script that changes one of that style's properties. The style is... -------------------------------------------------- ..xtable, .xtable TD, .xtable TH { background-color:black; color:white; font-family:arial; }
0
9718
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7649
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5544
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3847
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.