Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do leading hyphens mean in CSS? [closed]

Tags:

css

On this blog post I found the following CSS snippet:

html { 
    background: url(images/bg.jpg) no-repeat center center fixed; 
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

Although I took some basic CSS courses, I never saw hyphens as in -webkit-... in CSS before. In this case they seem to refer to the layout engines of the main browsers but what do they mean in general?

When Googling this, all results target text hyphenation in the browser :-/

like image 409
RubenGeert Avatar asked Jan 17 '13 16:01

RubenGeert


People also ask

What does hyphen mean in CSS?

The hyphens CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate.

What does double hyphen mean in CSS?

A double leading dash is used for defining custom properties.

Can CSS classes have hyphens?

CSS is a hyphen-delimited syntax language which means while writing HTML attributes we can use hyphen(-). Example: font-size, line-height, background-color, etc...

What does a hyphen mean at the end of a text?

The dash, slash, ellipses, and brackets are marks that serve specific purposes as indicated below. THE DASH. The dash (–) is used to set off additional material within a sentence, often in order to emphasize it, to set off appositives that contain commas, or to indicate missing words.

What is the use of hyphenation in CSS?

When the property of hyphenation is auto, automatically the hyphen is inserted in required areas inside the word so that you will get wrapped up text as per the need. This value puts the hyphen property which is its default one. Child element automatically gets parent element property. How does Hyphens Property work in CSS?

What is the hyphens property in HTML?

The hyphens property defines whether hyphenation is allowed to create more soft wrap opportunities within a line of text. The numbers in the table specify the first browser version that fully supports the property.

How do I set the leading/line-height of text in CSS?

<p style="line-height: 280%;max-width:200px;">There is no "CSS leading" property - the CSS specification uses the line-height property to apply leading. Leading gives the impression of lines of text being closer together or further apart.</p> You can also use the CSS font property to set the leading/line-height property values.

Is there a leading property in CSS?

CSS leading. If you're a desktop publisher, you would be familiar with the term leading. Applying leading to a paragraph of text adds space in between each line. Fortunately you can use Cascading Style Sheets (CSS) to apply leading. The trick to remember is that there isn't actually a CSS leading property.


1 Answers

They are vendor specific CSS properties.

html { 
  background: url(images/bg.jpg) no-repeat center center fixed; 
  -webkit-background-size: cover; /* WEBKIT - Chrome, Safari */
  -moz-background-size: cover; /* MOZILLA - Firefox */
  -o-background-size: cover; /* OPERA */
  background-size: cover;
}

Hypens are used to introduce vendor specific CSS properties, which are used by the browsers but not yet recognized as standard for CSS.

Prefixes often used in CSS are:

Android: -webkit-
Chrome: -webkit-
Firefox: -moz-
Internet Explorer: -ms-
iOS: -webkit-
Opera: -o-
Safari: -webkit-
like image 188
Ragnarokkr Avatar answered Oct 31 '22 19:10

Ragnarokkr