To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

Stylus (style sheet language)

From Wikipedia, the free encyclopedia

Stylus
Designed byTJ Holowaychuk
DeveloperLearnBoost (March 29, 2011 (2011-03-29) - March 26, 2015 (2015-03-26)) / Automattic (March 26, 2015 (2015-03-26) - Present)[1]
First appeared2010; 13 years ago (2010)
Stable release
0.54.8[2] / July 16, 2020; 3 years ago (2020-07-16)
Typing disciplinedynamic
OSCross-platform
LicenseMIT License
Filename extensions.styl
WebsiteStylus (Github)
Influenced by
CSS, Sass, Less

Stylus is a dynamic stylesheet preprocessor language that is compiled into Cascading Style Sheets (CSS). Its design is influenced by Sass and Less. It is regarded as the fourth most used CSS preprocessor syntax.[3] It was created by TJ Holowaychuk, a former programmer for Node.js and the creator of the Luna language. It is written in JADE and Node.js.

Selectors

Unlike CSS, which uses braces to open and close declaration blocks, indentation is used. Additionally, semi-colons (;) are optionally omitted. Hence, the following CSS:

body {
    color: white;
}

can be shortened to:

body 
    color: white

Further, colons (:) and commas (,) are also optional; that means the above can be written as,

body 
    color white

Variables

Stylus allows variables to be defined, however unlike Less and Sass, it doesn't use a symbol to define variables. Additionally, variable assignment is done automatically by separating the property and keyword(s). In this way, variables are similar to the variables in Python.

message = 'Hello, World!'

div::before
  content message
  color #ffffff

The Stylus compiler would translate the above document to:

div::before {
  content: 'Hello, World!';
  color: #ffffff;
}

Mixins and functions

Both mixins and functions are defined in the same manner, but they are applied in different ways.

For example, if you wanted to define the CSS border radius property without having to use various Vendor Prefixes you can create:

border-radius(n)
  -webkit-border-radius n
  -moz-border-radius n
  border-radius n

then, to include this as a mixin, you would reference it as:

div.rectangle 
  border-radius(10px)

this would compile to:

div.rectangle {
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  border-radius: 10px;
}

Interpolation

To include variables in arguments and identifiers, brace characters surround the variable(s). For example,

 -webkit-{'border' + '-radius'}

evaluates to

-webkit-border-radius

References

  1. ^ "LICENSE". GitHub. 2015-03-26. Retrieved 2015-12-21.
  2. ^ "Release 0.54.8". GitHub. 2020-07-16. Retrieved 2021-04-06.
  3. ^ Poll Results: Popularity of CSS Preprocessors

External links


This page was last edited on 27 December 2023, at 17:12
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.