diff --git a/items/2.1.3.html b/items/2.1.3.html index 6190b71..d02d166 100644 --- a/items/2.1.3.html +++ b/items/2.1.3.html @@ -22,7 +22,7 @@ P {
CSS3 provides further refinement of justification within the Text Module. For European languages, the text-justify
property provides two justification options: inter-word
and inter-character
.
CSS3 provides further refinement of justification within the Text Module. For European languages, the text-justify
property provides two justification options: inter-word
and inter-character
.
Setting inter-word
selects the simplest and fastest full justification behavior, which spreads the text evenly across the line by increasing the width of the space between words only. No expansion or compression occurs within the words, i.e. no additional letter spacing is created.
All white space in HTML, in any combination of spaces, tabs or line breaks, is automatically collapsed to a single word space. Therefore this guideline is automatically adhered to regardless of your training as a typist.
-If you do need to insert more than a single word space between sentences, or any other characters, then use one of the many space characters available in Unicode. Even if the character itself isn’t included in the current font, Unicode-aware browsers will display a good approximation. Avoid the temptation to use a non-breaking space,
, as this has a meaning in and of itself.
If you do need to insert more than a single word space between sentences, or any other characters, then use one of the many space characters available in Unicode. Even if the character itself isn’t included in the current font, Unicode-aware browsers will display a good approximation. Avoid the temptation to use a non-breaking space,
, as this has a meaning in and of itself.
 
en space -“Names such as W.B. Yeats and J.C.L. Prillwitz need hair spaces, thin spaces or no spaces at all after the intermediary periods [full stops]. A normal word space follows the last period in the string.”
Hair spaces and thin spaces are two of the many space characters available in Unicode. Even if the character itself isn’t included in the current font, Unicode-aware browsers will display a good approximation. Here’s how to use hair spaces and thin spaces, respectively:
+Hair spaces and thin spaces are two of the many space characters available in Unicode. Even if the character itself isn’t included in the current font, Unicode-aware browsers will display a good approximation. Here’s how to use hair spaces and thin spaces, respectively:
W. B. Yeats
J. C. L. Prillwitz
diff --git a/items/2.1.8.html b/items/2.1.8.html
index 2ce7e6e..ce11829 100644
--- a/items/2.1.8.html
+++ b/items/2.1.8.html
@@ -17,7 +17,7 @@ and <span class="kern">T</span>oronto
Notice that the span
was applied around the first letter of the pair, not around both letters. This is because the letter-spacing
property adds or removes space after each letter. Notice also that the letter-spacing
is specified in ems
to ensure that the amount of kerning is applied in proportion to the text size.
As with letterspacing strings of capitals, adding a span
every time you need to kern a letter pair could become tedious and so regular expressions could come to the rescue once more. This PHP function uses a regular expression to replace insert a span
into any string of ‘To’ or ‘Wa’:
As with letterspacing strings of capitals, adding a span
every time you need to kern a letter pair could become tedious and so regular expressions could come to the rescue once more. This PHP function uses a regular expression to replace insert a span
into any string of ‘To’ or ‘Wa’:
$search = '/(T)(o)|(W)(a)/';
$replace = '<span class="kern">$1$3</span>$2$4';
@@ -25,5 +25,5 @@ $text = preg_replace($search,$replace,$textThe Future
- The CSS3 Text Module may contain the kerning-mode
and kerning-pair-threshold
properties to aid control over kerning, although these properties have yet to be fully defined.
+ The CSS3 Text Module may contain the kerning-mode
and kerning-pair-threshold
properties to aid control over kerning, although these properties have yet to be fully defined.
\ No newline at end of file
diff --git a/items/2.2.2.html b/items/2.2.2.html
index af3394c..a5363f1 100644
--- a/items/2.2.2.html
+++ b/items/2.2.2.html
@@ -24,7 +24,7 @@
One can also set asymmetrical margins for headings, provided the margins combine to be multiples of the basic line height. For example, a top margin of 1½ lines could be combined with a bottom margin of half a line as follows:
- 
+ 
h2 {
line-height: 1.286;
diff --git a/items/2.3.2.html b/items/2.3.2.html
index 18659d0..c627561 100644
--- a/items/2.3.2.html
+++ b/items/2.3.2.html
@@ -26,7 +26,7 @@ p + p {
Block Paragraphs
- As stated earlier, block paragraphs – paragraphs separated by line breaks – are the default method used by web browsers. As explained in §2.2.2 the margins separating paragraphs should be set equal to the line-height in order that the rhythm of the text is maintained.
+ As stated earlier, block paragraphs – paragraphs separated by line breaks – are the default method used by web browsers. As explained in §2.2.2 the margins separating paragraphs should be set equal to the line-height in order that the rhythm of the text is maintained.
Outdenting
diff --git a/items/2.3.3.html b/items/2.3.3.html
index 7702583..d208110 100644
--- a/items/2.3.3.html
+++ b/items/2.3.3.html
@@ -6,5 +6,5 @@
blockquote {
margin:1.5em }
- As explained in §2.2.2, the margins should be sized so that the rhythm of the text is maintained. Where the blockquote text size is the same as the main text, the separating margins should be set equal to the line-height.
+ As explained in §2.2.2, the margins should be sized so that the rhythm of the text is maintained. Where the blockquote text size is the same as the main text, the separating margins should be set equal to the line-height.
\ No newline at end of file
diff --git a/items/2.3.4.html b/items/2.3.4.html
index 38dddec..8fde931 100644
--- a/items/2.3.4.html
+++ b/items/2.3.4.html
@@ -49,7 +49,7 @@ Thinks in a marrow bone.</span></pre>
display: inline-block;
white-space: pre; }
- The display:inline-block
in the preceding rule causes Gecko-based browsers such as Firefox and Camino to incorrectly render the contents. Fortunately these rules are only required for Internet Explorer, so we can write them in a separate style sheet, included using conditional comments (see Quirksmode for more info):
+ The display:inline-block
in the preceding rule causes Gecko-based browsers such as Firefox and Camino to incorrectly render the contents. Fortunately these rules are only required for Internet Explorer, so we can write them in a separate style sheet, included using conditional comments (see Quirksmode for more info):
<!-[if lte IE 7]>
<link rel="stylesheet" type="text/css" href="ie-lte-7.css" />
diff --git a/items/2.4.1.html b/items/2.4.1.html
index 99af6be..5cd7e61 100644
--- a/items/2.4.1.html
+++ b/items/2.4.1.html
@@ -5,7 +5,7 @@
Liquid layouts and resizable text mean that, on the Web, one never knows which word will be at the end of a line. To deal with this in HTML, there are two types of hyphens: the plain hyphen and the soft hyphen. Browsers treat the plain hyphen as just another character. The soft hyphen tells the browser where a word break can occur, and should only be displayed when a word is being broken across two lines.
- The soft hyphen has existed since HTML 3.2, and is explained well in the HTML 4.0 recommendation. Its entity code is ­
or ­
and is used as follows:
+ The soft hyphen has existed since HTML 3.2, and is explained well in the HTML 4.0 recommendation. Its entity code is ­
or ­
and is used as follows:
anti­dis­est­ab­lish­ment­arian­ism
@@ -15,12 +15,12 @@
The Future
- Until recently, the CSS 3 Text module contained the hyphenate
property which could be set to auto
or none
. This property introduced the concept of automatic hyphenation to browsers, and would require that the web browser has a hyphenation dictionary for the language of the text being hyphenated. For example:
+ Until recently, the CSS 3 Text module contained the hyphenate
property which could be set to auto
or none
. This property introduced the concept of automatic hyphenation to browsers, and would require that the web browser has a hyphenation dictionary for the language of the text being hyphenated. For example:
p {
hyphenate: auto; }
- At the time of writing, the latest Working Draft of March 2007, states that the definition of the hyphenation feature is still very much up-in-the-air, but it’s likely that advanced hyphenation controls will be introduced. The CSS 3 Paged Media module has more details of the hyphenation properties originally proposed, among these are the hyphenate-before
and hyphenate-after
properties which specify the minimum number of characters in a hyphenated word before and after the hyphenation character. For example:
+ At the time of writing, the latest Working Draft of March 2007, states that the definition of the hyphenation feature is still very much up-in-the-air, but it’s likely that advanced hyphenation controls will be introduced. The CSS 3 Paged Media module has more details of the hyphenation properties originally proposed, among these are the hyphenate-before
and hyphenate-after
properties which specify the minimum number of characters in a hyphenated word before and after the hyphenation character. For example:
p {
hyphenate-before:2;
diff --git a/items/2.4.3.html b/items/2.4.3.html
index bea4e38..163462d 100644
--- a/items/2.4.3.html
+++ b/items/2.4.3.html
@@ -1,8 +1,8 @@
-This guideline can be achieved easily when hyphenating manually. See §2.4.1 for more information on manual hypenation.
+This guideline can be achieved easily when hyphenating manually. See §2.4.1 for more information on manual hypenation.
The Future
- Hyphenation will be included in the CSS 3 Text module, but at the time of writing, the definition of the hyphenation feature is still very much up-in-the-air. Currently the CSS 3 Paged Media module has more details of the hyphenation properties originally proposed, and among these is the hyphenate-lines
property which specifies the maximum number of successive hyphenated lines in an element. For example:
+ Hyphenation will be included in the CSS 3 Text module, but at the time of writing, the definition of the hyphenation feature is still very much up-in-the-air. Currently the CSS 3 Paged Media module has more details of the hyphenation properties originally proposed, and among these is the hyphenate-lines
property which specifies the maximum number of successive hyphenated lines in an element. For example:
p {
hyphenate: auto;
diff --git a/items/3.1.1.html b/items/3.1.1.html
index 5d2897f..9219e9b 100644
--- a/items/3.1.1.html
+++ b/items/3.1.1.html
@@ -8,7 +8,7 @@
For text which is to be read on screen, the situation is slightly more complicated. Arguably the most appropriate unit is pixels which is a unit relative to the screen resolution. Setting text sizes in pixels gives web designers precision similar to that afforded to print designers. However, Internet Explorer does not allow readers to resize text set in pixels (although IE7 does provide full page zooming), so we need to look to other units.
- Sizing text using the em
unit is the next most appropriate approach. The em is a true typographic unit and was recommended by the W3C from the outset of CSS. Ems are a relative unit and act as multipliers based on the text element’s parent element. Thus, if the body
of a web page has 16 px text by default, making paragraphs render at 12 px would require setting paragraphs at 0.75em
.
+ Sizing text using the em
unit is the next most appropriate approach. The em is a true typographic unit and was recommended by the W3C from the outset of CSS. Ems are a relative unit and act as multipliers based on the text element’s parent element. Thus, if the body
of a web page has 16 px text by default, making paragraphs render at 12 px would require setting paragraphs at 0.75em
.
p { font-size:0.75em; /* 16x0.75=12 */ }
diff --git a/items/3.2.1.html b/items/3.2.1.html
index e4378a4..ef87d87 100644
--- a/items/3.2.1.html
+++ b/items/3.2.1.html
@@ -11,7 +11,7 @@
The Future
- The CSS3 fonts module is still a working draft, but is being actively revised. The current editor’s draft includes a proposal for supporting specification of lining or old-style numbers through the font-variant-numeric
property.
+ The CSS3 fonts module is still a working draft, but is being actively revised. The current editor’s draft includes a proposal for supporting specification of lining or old-style numbers through the font-variant-numeric
property.
For example, one could specify old-style figures using the oldstyle-nums
value as follows: