Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

JavaScript Style Sheets

From Wikipedia, the free encyclopedia
Stylesheet language proposed by Netscape
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "JavaScript Style Sheets" – news ·newspapers ·books ·scholar ·JSTOR
(November 2023) (Learn how and when to remove this message)
JavaScript Style Sheets
Internet media type
text/javascript
Developed byNetscape Communications Corporation
Type of formatStyle sheet language
StandardNetscape's JavaScript-Based Style Sheets submission to the W3C

JavaScript Style Sheets (JSSS) was astylesheet language technology proposed byNetscape Communications in 1996 to provide facilities for defining the presentation ofwebpages.[1] It was an alternative to theCascading Style Sheets (CSS) technology.[1]

Although Netscape submitted it to theWorld Wide Web Consortium (W3C), the technology was never accepted as a formal standard and it never gained acceptance in theweb browser market. OnlyNetscape Communicator 4 implemented JSSS, with rivalInternet Explorer choosing not to implement the technology. Soon after Netscape Communicator's release in 1997, Netscape stopped promoting JSSS, instead focusing on the rival CSS standard, which was also supported by Internet Explorer and had a much wider industry acceptance.

The follow-up to Netscape Communicator,Netscape 6 (released in 2000), dropped support for JSSS. It now remains little more than a historical footnote, withweb developers generally unaware of its previous existence. The proposal did not become a W3C standard.

Syntax

[edit]

UsingJavaScript code as a stylesheet, JSSS styles individual element by modifying properties of adocument.tags object. For example, the CSS:

h1{font-size:20pt;}

is equivalent to the JSSS:

document.tags.H1.fontSize="20pt";

JSSS element names are case sensitive.

JSSS lacks the various CSS selector features, supporting only simple tag name, class and id selectors. On the other hand, since it is written using a completeprogramming language, stylesheets can include highly complex dynamic calculations and conditional processing. (In practice, however, this can be achieved usingJavaScript to modify the stylesheets applicable to the document at runtime.)Because of this JSSS was often used in the creation ofdynamic web pages.

Example

[edit]

The following example shows part of the source code of an HTML document:

<styletype="text/javascript">tags.H1.color="red";tags.p.fontSize="20pt";with(tags.H3){color="green";}with(tags.H2){color="red";fontSize="16pt";marginTop="4cm";}</style>

Similar toCascading Style Sheets, JSSS could be used in a<style> tag. This example shows two different methods to select tags.

Browser support

[edit]

Javascript Style Sheets were only supported by Netscape 4.x (4.0–4.8) but no later versions. No otherweb browser has ever implemented JSSS.

References

[edit]
  1. ^abHåkon Wium Lie;Bert Bos."Chapter 20 - The CSS saga".World Wide Web Consortium. Retrieved23 June 2010.

External links

[edit]
Dialects
Engines
(list)
Frameworks
Client-side
Server-side
Multiple
  • Cappuccino
Libraries
People
Other
Browser versions
E-mail clients
Other components
Server software
Web services
People
See also
Modes
Standard
Preprocessor
Products,
standards
Recommendations
Notes
Working drafts
Guidelines
Initiative
Deprecated
Obsoleted
Groups,
organizations
Elected
Working
Community, business
Closed
Software
Browsers
Conferences
Retrieved from "https://en.wikipedia.org/w/index.php?title=JavaScript_Style_Sheets&oldid=1261388332"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp