Cascading Style Sheets is a good way to specify the styles of fonts and other page elements on your. It makes it easier for you to update style s too, because when done right, you only need to make a single change to update the style s on multiple pages and elements. Cascading Style Sheets (CSS) is a stylesheet language used to describe the presentation of a document written in HTML or XML (including XML dialects such as SVG, MathML or XHTML). CSS describes how elements should be rendered on screen, on paper, in speech, or on other media. Re: Styles and Cascading Style Sheets?? Sstewart-lbmx Jul 27, 2007 8:18 AM ( in response to leannejamison ) Leanne -- Here's what I suggest for completely replacing a style sheet.
By Matt Rotter, Charity Kahn, and Paul Anderson
Style sheets (also known as Cascading Style Sheets or CSS) are groups of style rules, which in turn are groups of properties that define how an HTML element appears in a Web browser—for instance, green, italic, and Arial. You can define styles either within an HTML document or in an external file attached to the HTML document. As an external file, a single style sheet can affect multiple pages—even a whole site. This makes page-wide or site-wide changes much easier to implement.
As the term Cascading Style Sheets implies, more than one style sheet can be used on the same document, with different levels of importance. If you define conflicting styles for the same HTML element, the innermost definition—the one closest to the individual tag—wins. For example, a tag's style attribute takes precedence over a surrounding element's style, which has priority over a style defined in the head of the document, which in turn wins over an attached style sheet. If conflicting styles are defined at the same level, the one occurring later wins.
So how do style sheets work? Say you want to create a page where each instance of <H3> text is green, italicized, and in the Arial typeface. Before the advent of CSS, you had to write the following HTML every time you used <H3>:
<EM><FONT face='Arial' color='green'><H3>This is a green, italic, Arial H3 header.</H3></FONT></EM>
But CSS lets you specify this style for all<H3> tags in a single step by defining what's called a selector:
H3 { font-family: Arial; font-style: italic; color: green }
The selector (in this case, the <H3> element) is followed by the style definition, which outlines the style for that selector. The rule font-family: Arial has the same effect as <FONT face='Arial'>; font-style: italic has the same effect as <I>; and color: green has the same effect as <FONT color='green'>. So once the style above is applied to the HTML document, every <H3> element will come out green, italic, and Arial while retaining its inherent HTML characteristics.
Matt Rotter and Charity Kahn are software engineers for CNET.com.
Paul Anderson is an associate technical editor for CNET Builder.com.This is the talk page for discussing improvements to the Cascading Style Sheets article. This is not a forum for general discussion of the article's subject. | |||
|
| ||
Archives:1, 2, 3 |
Cascading Style Sheets has been listed as a level-5 vital article in Technology. If you can improve it, please do. This article has been rated as C-Class. |
Cascading Style Sheets is a former featured article candidate. Please view the links under Article milestones below to see why the nomination failed. For older candidates, please check the archive. | ||||
|
WikiProject Computing / Software | (Rated C-class, Mid-importance) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
WikiProject Internet | (Rated C-class) | |||||||
---|---|---|---|---|---|---|---|---|
|
Page Overhaul[edit]
I want to start an overhaul of this article, see here User:Darth NormaN/New CSS Article for a current state. What do you think, what is really needed, what could be removed? --Darth NormaN(talk) 01:55, 17 December 2010 (UTC)
- nothing happens there.. I also see not a reason to rewrite the full article - sections yes (but not reed on a separate page).. This article has the potential to get FA in far future.. mabdul 12:15, 11 February 2011 (UTC)
How to write 'web'?[edit]
The Web - how to write? I think it is wrong to write a proper noun without capitalisation of the first letter. So, the 'Web browser' would be the right way to write, as the Web stays for the one and only one World Wide Web. Sae1962 (talk) 08:54, 11 February 2011 (UTC)
- Maybe you look at Internet capitalization conventions since this consists on the same problematic. mabdul 10:26, 11 February 2011 (UTC)
- I think the best plan we have is that we do not capitalise adjectives (What kind of browser? A web browser. Similarly, a web page, web site, web technologies, internet access, etc), but we do, at the moment, still capitalise the nouns when they refer to the global items (the Web and the Internet, like the technologies that built the Web, access to the Internet, etc but not otherwise like 'I built a small private experimental internet between the offices', although nobody would say that any more). This capitalisation of the nouns is mainly an American usage, and looks very Germanic to me. It is not common in the UK and many other places where English is spoken, but there are a lot of American readers and editors here, and some of them feel strongly about it. --Nigelj (talk) 11:43, 11 February 2011 (UTC)
- Yeah, really common in German.. Oh and I would write these like in the UK. We should move the discussion to Wikipedia:Manual of Style (capital letters)! mabdul 12:13, 11 February 2011 (UTC)
- I think the best plan we have is that we do not capitalise adjectives (What kind of browser? A web browser. Similarly, a web page, web site, web technologies, internet access, etc), but we do, at the moment, still capitalise the nouns when they refer to the global items (the Web and the Internet, like the technologies that built the Web, access to the Internet, etc but not otherwise like 'I built a small private experimental internet between the offices', although nobody would say that any more). This capitalisation of the nouns is mainly an American usage, and looks very Germanic to me. It is not common in the UK and many other places where English is spoken, but there are a lot of American readers and editors here, and some of them feel strongly about it. --Nigelj (talk) 11:43, 11 February 2011 (UTC)
Talk:Web_page#Capitalizing_.22web.22 ¦ Reisio (talk) 10:46, 30 August 2011 (UTC)
Easily create concept mind maps and share them online! https://stepnew689.weebly.com/download-magic-data-recovery-pack-31-keys.html.
Primarily inspired by Grohl’s divorce from photographer Jennifer Youngblood in 1996, the lyricism on The Colour and the Shape is substantially more introspective and the music more developed. The album’s track listing was designed to resemble a therapy session, splitting the album between uptempo tracks and ballads, reflecting conflicting emotions. 1997 the colour and the shape rar. After the project ballooned and became an international success, the group convened for pre-production on their second album in the fall of 1996, and brought in producer Norton to establish a pop sensibility for the tracks. Produced by Gil Norton, it was the official debut of the Foo Fighters as a band, as their eponymous 1995 debut album was primarily recorded by frontman Dave Grohl and producer Barrett Jones as a demo. The band strived to create a full-fledged rock record, although the music press predicted another grunge offshoot.
- Wikipedia Manual of Style on Capital letters. LittleBen (talk) 05:20, 21 January 2012 (UTC)
Pros and Cons of CSS[edit]
I noticed that the section on 'Limitations' comes before the section 'Advantages'. Shouldn't these be switched around? A reader might skim down the page to see the advantages section, and then scroll down and be confused that the Limitations are not there. —Preceding unsigned comment added by 24.215.85.41 (talk) 15:14, 25 April 2011 (UTC)
There is a good reason the 'Limitations' are given priority: CSS is a headache.I wish CSS would {float:away;}
```` — Preceding unsigned comment added by 24.76.244.100 (talk) 01:28, 6 September 2012 (UTC)
BNF for selector - why is ':pseudo-' in blue?[edit]
On Mac/Safari the string ':pseudo-' (shown below in bold) is shown in blue. Not sure if intentional?
selector [, selector2, ..][:pseudo-class] {
}68.52.142.26 (talk) 15:53, 28 April 2011 (UTC)
- It's part of the behaviour of GeSHi, which is installed server-side here, when we specify '<source>' around the sample. It's not the word 'pseudo' that stimulates the blue colour-highlighting - anything after a : in a selector is highlighted that way, i.e. any pseudo class name, valid or not. GeSHi also makes the punctuation green and the comment grey. It uses different colours and rules for whichever software language you specify in the wiki-markup. --Nigelj (talk) 17:54, 28 April 2011 (UTC)
Priority scheme for CSS sources[edit]
Priority scheme for CSS sources (from highest to lowest priority)
Are Author styles really higher-priority than User styles?68.52.142.26 (talk) 15:58, 28 April 2011 (UTC)
- Yes. 'By default, rules in author style sheets have more weight than rules in user style sheets. Precedence is reversed, however, for '!important' rules. All user and author rules have more weight than rules in the UA's default style sheet.', http://www.w3.org/TR/CSS21/cascade.html --Nigelj (talk) 17:46, 28 April 2011 (UTC)
Flexibility Section Introduces Irrelavent Topic[edit]
Under the Advantages - Flexibility Section, the article talks about the advantages of Content Management Systems but does not clearly describe how this relates to CSS. While many Content Management Systems do employ CSS, this section is irrelavent and strays from the article topic. — Preceding unsigned comment added by 71.197.185.111 (talk) 08:46, 10 November 2011 (UTC)
Browser support paragraph[edit]
The Browser support paragraph needs to be updated. It has been written with an August 2009 perspective. And the 'Limitations' and 'Advantages' section should be switched. These days _a large majority_ of web pages uses CSS. No need to create the impression that there are viable alternatives. CSS is _the_ web styling DSL. — Preceding unsigned comment added by 138.188.100.254 (talk) 08:07, 9 February 2012 (UTC)
- The problem is that we need reliable references for this, otherwise it would be original research!mabdul 13:54, 9 February 2012 (UTC)
Classes[edit]
While Pseudo-classes are defined but Classes are not. Shouldn't they be defined too? --79.40.164.18 (talk) 16:18, 5 March 2012 (UTC)
Section Uses is broken[edit]
The uses section of this page is reporting php code from mediawiki and may need to be reviewed. Help is needed to correct this issueNotinREALITY 23:25, 25 March 2012 (UTC)
- UPDATE Section has been repaired, may have been proxy issue :D NotinREALITY 23:27, 25 March 2012 (UTC)
redundant[edit]
Isn't calling CSS: Cascading Style Sheets redundant when we say CSS Cascading Style Sheets? This article uses the acronym with its meaning in sequential order in a redundant fashion. I am wondering why? My query is: Shouldn't this be corrected to read only CSS once the antecedent is identified and recognized the first time? Thank you.
- I don't know what you want to say since the article only mentions Cascading Style Sheets only one time (in the lede plus in the infobox, in the navigation boxes, and in the references). Or are you talking about something different? mabdul 16:45, 30 April 2012 (UTC)
HTML, XML, SVG..[edit]
There are a great many references in the article to 'HTML'. We should remember that CSS is also applied to XML, XHTML, SVG and many other document types that are based on XML. There used to be an example here of taking arbitrary XML markup, and applying a stylesheet to create a perfectly good display in a normal browser. At the very least, I think we should go through the whole article replacing all these references to 'HTML' with something like 'the markup' or 'the document', or 'the document markup'. I'm sure people will be coming here because of the use of CSS in whatever XML technology they are looking at, and wondering at all these references to HTML, which is irrelevant to them. --Nigelj (talk) 17:55, 30 April 2012 (UTC)
- Support - CSS is independent of HTML. mabdul 14:18, 3 May 2012 (UTC)
- Oppose CSS is regularly applied to HTML. The application of CSS to non-HTML XML (which would include SVG) is possible, and was considered at one time to be a likely avenue for its development. However in practice it turned out to be an evolutionary dead end and, in practical terms, it just doesn't happen. It should be mentioned that CSS has been used to render XML too, but not to the point where we confuse the readability of a mainstream explanation of CSS being applied to HTML by behaving as if it was applied to anything else with any sort of frequency. Andy Dingley (talk) 14:49, 3 May 2012 (UTC)
- You are aware that 'It is a requirement that CSS styling can be applied to SVG [1.1] content', as of August last year?[1] Where are you getting your information about evolutionary dead ends and what does and doesn't happen? I think we need references please, for such a bold assertion. --Nigelj (talk) 17:21, 4 May 2012 (UTC)
- I have to say I am surprised at Andy Dingley writing this, especially as recently as 2012. Eisenberg's SVG Essentials contained an appendix on the use of CSS as early as 2002. So much of what was once defined in the SVG specification has since been devolved to, or subsumed by, CSS that SVG 2 would now be virtually useless without it. (There are a few who occasionally question the wisdom of this development.) Globbet (talk) 23:00, 24 July 2014 (UTC)
border-radius
[edit]
I added a bit to the section on CSS 3 addressing the increasing usage of the
border-radius
property in websites, but don't know where I got the information from. Can anyone find a possible resource for that? 68.173.113.106 (talk) 20:27, 28 May 2012 (UTC)History[edit]
When Tim Berners-Lee wrote ENQUIRE in 1980, he used a simple style sheet, so he definitely needs to be mentioned here. AmySmiles (talk)www.w3.org/Style/LieBos2e/history/ — Preceding unsigned comment added by AmySmiles (talk • contribs) 18:55, 13 June 2013 (UTC)
Removal of Syntax Example[edit]
I I just wanted to say that the recent removal of http://en.wikipedia.org/w/index.php?title=Cascading_Style_Sheets&diff=prev&oldid=577373579 is a annoying.'rm non-example that conveys absolutely nothing' Well maybe it's not a example as such but it certainly conveys what is meant in the above text by selector, :pseudo-class and such!Why not just remove the word example and put it under syntax or something???????What annoys me is when I show people the page now it only show what CSS isn't! http://en.wikipedia.org/w/index.php?title=Cascading_Style_Sheets&diff=prev&oldid=573924404— Preceding unsigned comment added by 123.2.137.85 (talk) 23:59, 30 November 2013 (UTC)
Expansion of topic[edit]
Should there be a separate article for CSS3? Or even more detail? Personally, I'd like to see a separate article for each module, and a list of modules which is sortable by W3C status and contains browser support status.Davidlark (talk) 12:49, 25 January 2014 (UTC)
Property overview[edit]
Adding this here to avoid a conflict of interest situation: The article lacks a pointer to all available CSS properties (now over 300), something that’s useful to get an overview and an idea of the size of CSS. The W3C doesn’t offer a complete list. I’m personally maintaining an index covering all of CSS (hence conflict of interest); I believe of the alternatives, none are complete, but maybe there’s something better. Suggestion for unbiased experts to decide.--j9t (talk) 01:59, 28 January 2014 (UTC)
- Oppose We're not a reference guide. It would be much better for us to link to one. Andy Dingley (talk) 02:17, 28 January 2014 (UTC)
- Clarification—That was the suggestion (pointing to an overview, not duplicating one).--j9t (talk) 08:40, 15 February 2014 (UTC)
Reset style sheets[edit]
Another suggestion, reset style sheets have played a relevant role in CSS development. Six Revisions probably wrote the most comprehensive article about the history of resets (though it’s not entirely accurate), which may be a good basis to work with or point to. (Though the article quotes me, and I responded, I’m not affiliated with them.) Resets may warrant more coverage beyond this, however.--j9t (talk) 01:59, 28 January 2014 (UTC)
Cascading?[edit]
May I timidly ask what is the meaning/significance of the word 'cascading'? I really do not know, and I came here hoping to learn. Can the origin of the term be included on the page? As for 'style sheet' - this is derived from the printing industry. It was a list of instructions to typesetters, compositors, proof-checkers etc. defining the 'house style' for publications printed at that establishment. Bluedawe 00:13, 7 April 2014 (UTC)
- 'Cascade' means for information to be passed down or passed on. A cascading waterfall passes down water as a CSS passes down information to the HTML document. Admittedly, I have never heard the term 'cascade' being used in this way. I usually think of waterfalls, not information. Hope this helps. Ripberger (talk) 02:35, 7 April 2014 (UTC)
- That's not what the CSS cascade means at all. The 'cascade' in CSS is the choice algorithm applied to the (possibly many) statements of CSS rules in all the stylesheets in scope for each page, then the choice of which style rule conveys the finally selected value for each property. http://www.w3.org/TR/CSS2/cascade.html#cascade
- Andy Dingley (talk) 02:44, 7 April 2014 (UTC)
Cheatsheet[edit]
I think that this free cheatsheet can be useful: [CSS3 Cheatsheet] — Preceding unsigned comment added by 80.28.246.222 (talk) 12:20, 7 July 2014 (UTC)
Odd language usage in the first few sentences[edit]
The use of the word 'describe' is incorrect. The parameters written in CSS are declarations (instructions). CSS is not having a casual chat with the browser! It is telling the browser what to do by giving instructions in a declarative manner. I have seen this usage of the the word 'describe' for HTML as well. It is just plain incorrect from a computing technology and English Language perspective. If no one changes it (or has any valid objections) I can reword it (if I remember to come back here!).--Hypernator (talk) 18:35, 24 September 2014 (UTC)
- I'm fine with it being altered, but I'm just replying to defend the use of 'describe' (not to object to your preference). That is, it's really not incorrect English usage to say that CSS describes document presentation. (Compare the definitions given at http://www.merriam-webster.com/dictionary/describe; and consider that 'color:white; background-color: orange' is a description in words of what the presentation should look like.) It may be preferable to say that it declares document presentation (or specifies it), but it's not 'wrong', language-wise, to say it describes it. But it may not be the word that most developers would prefer. So I understand your preference and have no objection to it being changed. (Only objected to the specific phrase 'just plain incorrect from .. English Language perspective.') Quercus solaris (talk) 02:57, 25 September 2014 (UTC)
- OK Quercus, I am inclined to agree with you in that I was possibly nit-picking. It is mainly just because I would attribute the 'describing' of something to be associated with something that already exists. Where webpages are concerned, the layout does not exist until until you have 'told' it (instructed it) what to do. For example, it could be said that the drill sergeant is 'describing' what he wants the troops to do when they are marching; it just does not seem to present it in an appropriate manner. It may be best if I leave it for the moment.--Hypernator (talk) 16:17, 27 September 2014 (UTC)
What is 'CSS-3D'?[edit]
I just ran into the term 'CSS-3D' in Jos Dirksen's book 'Three.js' (Oct 2013), and he mentions a new 'CSS-3D' specification (page 9). Is this an addition to the CSS standard defined by the W3C, or is it a separate project that just uses the acronym 'CSS'? Should it be mentioned in this article, or a separate article? I found a link to here at the w3.org site, linked from here on the Mozilla site, but the link is dead. Jimw338 (talk) 16:47, 29 March 2015 (UTC)
Definition of 'nominal'[edit]
The term 'nominal parameters' is used but what sense of 'nominal' is this? Googling the term just gets recyclings from this article. robotwisdom (talk) 08:27, 26 August 2015 (UTC)
we give command for adio or video setting — Preceding unsigned comment added by 59.88.124.20 (talk) 04:44, 17 October 2015 (UTC)
Illustration of code not consistent[edit]
Cascading Style Sheets Selectors
The image at the top right side of the Article page has a few inconsistencies:
- The first line in the h1 selector's ruleset (a.k.a. rule, style) has the first declaration immediately after the opening brace on the same line.
- This is not standard syntax when there are other declarations that are listed on separate lines beneath it.
- It is also inconsistent with the second selector's ruleset, which has a line break after the opening brace, which is standard syntax.
- Line 2 (the second declaration of the h1 ruleset) uses the shorthand property
background
for the background color whereas line 10 (the body ruleset's first declaration) uses the specific propertybackground-color
- Line 4 can be written simply as
padding: 0;
- This is shorthand that means the same thing – in the CSS box model a single value represents all four sides.
- 'The 'padding' property is a shorthand property for setting 'padding-top', 'padding-right', 'padding-bottom', and 'padding-left' at the same place in the style sheet.' – Worldwide Web Consortium.
- Although there is nothing technically wrong with showing all four values, it is not consistent with other declarations that do use shorthand:
background:orange; *
border: 1px solid black; **
border: 12px solid; **
- This is shorthand that means the same thing – in the CSS box model a single value represents all four sides.
- * W3C – background shorthand
- ** W3C – border shorthand property: 'The 'border' property is a shorthand property for setting the same width, color, and style for all four borders of a box.'
Additional references:
- re: padding
- See the 'Padding - Shorthand property' section – W3 Schools.
- See the 'Syntax' section, the first example – Mozilla Developers Network.
Suggested alternative example code (note that I have also removed all the spaces between the colon ( : ) and the values.
Free Cascading Style Sheets
Dawnvawn (talk) 22:15, 26 October 2015 (UTC)
Methodologies - new page?[edit]
Should the design methodologies section be made into a new topic unto itself? there are multiple such ones and they have their own websites and stuff what you peeps think! Krehel (talk) 02:59, 23 February 2018 (UTC)
History Discrepancy[edit]
A. The history section reads: 'At the time, Lie was working with Tim Berners-Lee at CERN.'
B. However, the W3C article reads: 'The World Wide Web Consortium (W3C) was founded by Tim Berners-Lee after he left the European Organization for Nuclear Research (CERN) in October, 1994.' (emphasis mine)
C. According to World_Wide_Web_Consortium#History, the W3C was formed on October 1.
If B & C are correct, then A cannot be.
Information from [W3C](https://www.w3.org/Style/History/Overview.en.html) suggests the story is a bit different.
Currently, the first portion of the history section seems to roughly be of the following form:- A questionable assertion on the authorship of the CSS1 standard- A note on stylesheets in general and the unique problems posed by 'stylesheets on the web'- Notes on patterns of presentation that were common at the time (browser-specific stylesheets)- A questionable assertion on how the community pared down then-current proposals into what we now know as CSS1- Irrelevant information about working groups of the W3C
I would propose the following form instead:- Information about pre-web stylesheets- Information about pre-CSS styling concerns (browser-specific stylesheets, etc.)- A history that more accurately portrays the different directions of thinking at the time, more closely reflecting the varied authorship reflected in the W3C's history of CSS page (this could include the mention of Netscape's JSSS proposal), culminating in the publishing of the CSS1 proposal
I think this would better reflect how the social systems and motivations that produced the web as we know it were (like the web itself) decentralized and built by the influence of many different paradigms, individuals, discussions, and ideas -- as opposed to being the brain child of just a select few.
--Jimmcnulty41 (talk) 22:54, 18 June 2019 (UTC)
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Talk:Cascading_Style_Sheets&oldid=902453748'