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 :-/
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.
A double leading dash is used for defining custom properties.
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...
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.
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?
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.
<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.
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.
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-
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With