JavaScript Style Sheets

Short description: Stylesheet language proposed by Netscape

JavaScript Style SheetsInternet media type| `text/javascript`

|

Developed by| Netscape Communications Corporation
Type of format| Style sheet language
Standard| Netscape's JavaScript-Based Style Sheets submission to the W3C

JavaScript Style Sheets (JSSS) was a stylesheet language technology proposed by Netscape Communications in 1996 to provide facilities for defining the presentation of webpages.[1] It was an alternative to the Cascading Style Sheets (CSS) technology.[1]

Although Netscape submitted it to the World Wide Web Consortium (W3C), the technology was never accepted as a formal standard and it never gained acceptance in the web browser market. Only Netscape Communicator 4 implemented JSSS, with rival Internet 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, with web developers generally unaware of its previous existence. The proposal did not become a W3C standard.

## Contents

* 1 Syntax
* 1.1 Example
* 2 Browser support
* 3 References
* 4 External links

## Syntax

Using JavaScript code as a stylesheet, JSSS styles individual element by modifying properties of a `document.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 complete programming language, stylesheets can include highly complex dynamic calculations and conditional processing. (In practice, however, this can be achieved using JavaScript to modify the stylesheets applicable to the document at runtime.) Because of this JSSS was often used in the creation of dynamic web pages.

### Example

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

<style type="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 to Cascading Style Sheets, JSSS could be used in a `<style>` tag. This example shows two different methods to select tags.

## Browser support

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

## References

1. ↑ 1.0 1.1 Håkon Wium Lie; Bert Bos. "Chapter 20 - The CSS saga". World Wide Web Consortium. http://www.w3.org/Style/LieBos2e/history/.

## External links

* Netscape's JavaScript-Based Style Sheets submission to the W3C
* The dynamic, powerful abilities of JavaScript Style Sheets
* JavaScript Style Sheet Reference

* v
* t
* e

ECMAScript

Dialects|

* ActionScript
* Caja
* JavaScript
* engines
* asm.js
* JScript
* JScript .NET
* QtScript
* TypeScript
* WMLScript

Engines
(comparison)|

* Carakan
* Futhark
* InScript
* JavaScriptCore
* JScript
* KJS
* Linear B
* Narcissus
* QtScript
* Rhino
* SpiderMonkey
* TraceMonkey
* JägerMonkey
* Tamarin
* V8
* ChakraCore
* Chakra
* JScript .NET
* Nashorn

Frameworks|

| Client-side|

* Chaplin.js
* Dojo
* Echo
* Ext JS
* Google Web Toolkit
* jQuery
* Lively Kernel
* midori
* MochiKit
* MooTools
* Prototype
* Pyjs
* qooxdoo
* Rialto
* Rico
* script.aculo.us
* SmartClient
* SproutCore
* Spry
* Wakanda Framework

|

Server-side|

* AppJet
* Jaxer
* Node.js
* WakandaDB

Multiple|

* Cappuccino
* Objective-J
* PureMVC

Libraries|

* Backbone.js
* SWFObject
* SWFAddress
* Underscore.js

People|

* Brendan Eich
* Douglas Crockford
* John Resig
* Scott Isaacs

Other|

* DHTML
* Ecma International
* JSDoc
* JSGI
* JSHint
* JSLint
* JSON
* JSSS
* Sputnik
* SunSpider
* Asynchronous module definition
* CommonJS

Lists
JavaScript libraries
Ajax frameworks
Comparisons
JavaScript frameworks
server-side JavaScript

* v
* t
* e

Style sheet languages

Modes|

* Desktop publishing
* Web development
* User interfaces

Standard|

* Cascading (CSS)
* DSSSL
* Extensible (XSL)

Preprocessor|

* JavaScript (JSSS)
* FOSI
* Qt
* Sass
* Less
* Stylus
* SMIL Timesheets
* PostCSS

* List
* Comparison

* v
* t
* e

World Wide Web Consortium (W3C)

Products and
standards|

| Recommendations|

* ActivityPub
* ARIA
* Canonical XML
* CDF
* CSS
* DOM
* Geolocation API
* HTML (HTML5)
* ITS
* JSON-LD
* Linked Data Notifications
* MathML
* Micropub
* OWL
* PLS
* RDF
* RDF Schema
* SISR
* SKOS
* SMIL
* SOAP
* SRGS
* SRI
* SSML
* SVG
* SCXML
* SHACL
* SPARQL
* Timed text
* VoiceXML
* Web storage
* WSDL
* Webmention
* WebSub
* XForms
* XHTML
* XHTML+RDFa
* XInclude
* XLink
* XML
* XML Base
* XML Encryption
* XML Events
* XML Information Set
* XML namespace
* XML Schema
* XML Signature
* XOP
* XPath
* XPath 2.0
* XPointer
* XProc
* XQuery
* XSL
* XSL-FO
* XSLT (elements)

|

Notes|

* IndieAuth
* JF2
* Post Type Discovery
* XAdES
* XHTML+SMIL
* XUP

Working drafts|

* CCXML
* CURIE
* EME
* InkML
* MSE
* RIF
* SMIL Timesheets
* sXBL
* XFDL
* XFrames
* XBL
* XMLHttpRequest

Guidelines|

* Web Content Accessibility Guidelines

Initiative|

* Multimodal Interaction Activity (MMI)
* Markup Validation Service
* Web Accessibility Initiative
* WebPlatform

Deprecated|

* C-HTML
* HDML
* JSSS
* PGML
* VML
* XHTML+MathML+SVG

Obsoleted|

* P3P

Organizations|

* Advisory Committee (AC)
* World Wide Web Foundation

Elected groups|

* Advisory Board (AB)

Working groups|

* CSS
* Geolocation
* Social Web
* SVG
* Web Hypertext Application Technology (WHATWG)
* Web Platform

Community groups|

* Web Incubator Community Group (WICG)

Closed groups|

* Device Description (DDWG)
* HTML

Software|

* CERN httpd
* Libwww

Browsers|

* Line Mode (1990–)
* Arena (1993–98)
* Agora (1994–97)
* Argo (1994–97)
* Amaya (browser/editor, 1996–2012)

Conferences|

* International World Wide Web Conference (IW3C)
* Steering Committee (IW3C2)
* First conference ("WWW1", 1994)

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/JavaScript Style Sheets. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=JavaScript_Style_Sheets&oldid=183088"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template