-
Notifications
You must be signed in to change notification settings - Fork 693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-values] Traditional absolute length units #315
Comments
AH asked us to add I'm fine with adding them, but want implementor interest first. |
My point is that implementor interest might be harmful in this case, because if AH supported it they’d likely want to standardize their odd definition which doesn’t play well with any of the existing length units, whereras a proactively defined Btw., did someone lately mention the coincidental ratio of approximately √2 between |
Interesting argument, but proactively defining things without sufficient interest isn't really something we do, for good reasons. |
I’m fine with that as long as |
FWIW, Gecko used to have support for didot (as 'dt') and ciceros (as 'cc') where 15dt = 16pt and 1cc = 12dt (as in back in 1997, removed somewhere along the way for conformance reasons). It also had feet ('ft'), miles ('mi'), meters ('m'), kilometers ('km'), and extra typographic units 'en' (1/2 'em') and 'cap' (cap height, which still seems useful, especially with the new drop cap support). |
Thanks, I didn’t know that, @plinss. Support was removed in 2009 by @dbaron, bug 482146. JFTR, |
Today I learned that (some descendants of) Teχ supports |
I put |
Traditional typesetting in the U.S. mostly uses picas/points and inches. Sadly, they're used in ways that CSS doesn't support—for example, 3p4.5 = 9/16in. Oh well. That's why typesetters always have a conversion chart near their desks. |
Agreed, picas are extremely useful units and are still commonly taught and used in other software, but they're best used with points as the fraction, not a decimal fraction. Not having the traditional (pica)p(point) notation in CSS has been an oversight, let's fix it. Yeah it's a new parsing behavior, but I don't see it as being fundamentally incompatible, at least no worse than adding scientific notation was. |
If that would ease the transition into CSS for experienced typesetters used to other technologies, why not. |
Unlike teχers, traditional typesetters are probably fine with
The real problem is not this particular traditional syntax, but vulgar fractions and (irrational) constants (like π or τ in #309 and ϕ or √2). The former can be done with Sadly, this is an issue where switching to relative or metric length units doesn’t help much. |
@plinss @frivoal One issue per GitHub discussion, please. :) If you want NpM notation, file it separately (tagged under ~fantasai |
@fantasai You’re right, the last four messages before yours (from dauhwe, plinss, frivoal and me) should be in a separate issue, although cicero and didot are used together much like pica and point. I don’t really want or need the Didot point and cicero, but I want to make sure that if they‘re implemented then their unit symbols are |
Collecting and asserting units mentioned above, my proposal is to add the following absolute length units to css-values:
|
I don't think many of these units would serve a practical purpose in CSS. How often do you have a layout with dimensions most conveniently expressed in yards? Completeness for completeness' sake is not something we should pursue. Units that expose new capabilities (e.g. |
I humbly disagree and kindly ask you to be more specific with your critique. I believe these units would improve productivity for some authors, once widely supported – and therefore should have been introduced as early as possible. They are also simpler and cheaper to implement than basically every other new CSS feature.
Let’s make CSS homey for more people! |
For the tiny and the large units, I just don't see them being used. Yes, they exist out there, the SI systems (and others) are well defined and all that, so if we were to define them it is very obvious how to do so, but I just don't see any benefit to doing so, and again, while the costs are low due to this being a simple feature, they are not nothing. |
Fair enough. Documenting demand is something this issue is for. I think it makes sense to eventually push these together with other new units to exploit some synergy effects. |
Dael Jackson @ www-style (2017-02-13): [CSSWG] Minutes Seattle F2F 2017-01-11 Part VI: Writings Modes, CSS Tables, Values & Units 4 Traditional pica notation #378 is discussed under the heading “Adding older typographic units”, actual units in “ciceros, didot, and ens”.
That’s exactly why I want didot points to be specified in CSS: They need a canonical abbreviation and definition and it should not be |
IMO |
@Loirooriol In the context of CSS, this is as much a non-issue as |
Closing as WONTFIX in absence of clear developer or implementer demand. If there ends up being demand for any particular one of these from some industry sector (e.g. ePUB), they can file an independent issue for that one case. |
If #7379 gets adopted: /** General metric units */
@property --m {
/* ‘meter’ */
syntax: "<length>";
initial: 100cm;
inherits: true;
}
@property --dm {
/* ‘decimeter’ */
syntax: "<length>";
initial: 10cm;
inherits: true;
}
@property --mu {
/* ‘micrometer’ */
syntax: "<length>";
initial: 0.001mm;
inherits: true;
}
/** Typographic metric units */
@property --cc {
/* ‘cicero’ */
syntax: "<length>";
initial: 12--dd;
inherits: true;
}
@property --dd {
/* ‘DIN Didot point’ */
syntax: "<length>";
initial: 0.376065mm;
/* Berthold: calc(5cm / 133),
French: calc(15625mm / 41559) */
inherits: true;
}
@property --nd {
/* ‘new, metric Didot point’ */
syntax: "<length>";
initial: 0.375mm;
inherits: true;
}
@property --dt {
/* ‘anglicized Didot point’ */
syntax: "<length>";
initial: calc(16pt / 15);
inherits: true;
}
@property --fp {
/* ‘Fournier point’ */
syntax: "<length>";
initial: calc(11--dd / 12);
/* 0.34875mm */
inherits: true;
}
@property --tp {
/* ‘Truchet point’ */
syntax: "<length>";
initial: calc(1--dd / 2);
/* calc(15625mm / 83118) */
inherits: true;
}
/** General English units */
@property --yd {
/* ‘yard’ */
syntax: "<length>";
initial: 36in;
inherits: true;
}
@property --ft {
/* ‘foot’ */
syntax: "<length>";
initial: 12in;
inherits: true;
}
@property --hd {
/* ‘hand’ */
syntax: "<length>";
initial: 4in;
inherits: true;
}
/** Fractional English units */
@property --sx {
/* ‘sixteenth-inch’ or ‘six-pixel’ */
syntax: "<length>";
initial: 6px; /* = calc(1in / 16) */
inherits: true;
}
@property --tx {
/* ‘thirtysecondth-inch’ or ‘three-pixel’ */
syntax: "<length>";
initial: 3px; /* = calc(1in / 32) */
inherits: true;
}
@property --twip {
/* ‘twentieth-point’ */
syntax: "<length>";
initial: 0.05pt;
inherits: true;
}
@property --tex {
/* ‘TeX point’ */
syntax: "<length>";
initial: calc(100in / 7227);
inherits: true;
}
/** Common anchor unit */
@property --dot {
/* alias ‘gcd’, ‘emu’ */
syntax: "<length>";
initial: calc(1pt / 508);
inherits: true;
}
/** Relative units */
@property --en {
syntax: "<length>";
initial: 0.5em; /* 1ex has the same fallback value */
inherits: true;
}
/** Traditional font size names */
@property --American {
syntax: "<length>";
initial: 1pt;
inherits: true;
}
@property --German {
syntax: "<length>";
initial: 1.5pt;
inherits: true;
}
@property --Saxon {
syntax: "<length>";
initial: 2pt;
inherits: true;
}
@property --Norse {
syntax: "<length>";
initial: 2.5pt;
inherits: true;
}
@property --Excelsior { /* Minikin */
syntax: "<length>";
initial: 3pt;
inherits: true;
}
@property --Ruby {
syntax: "<length>";
initial: 3.5pt;
inherits: true;
}
@property --Brilliant {
syntax: "<length>";
initial: 4pt;
inherits: true;
}
@property --Gem {
syntax: "<length>";
initial: 4.25pt;
inherits: true;
}
@property --Diamond {
syntax: "<length>";
initial: 4.5pt;
inherits: true;
}
@property --Pearl {
syntax: "<length>";
initial: 5pt;
inherits: true;
}
@property --Agate {
syntax: "<length>";
initial: 5.5pt;
inherits: true;
}
@property --Nonpareil {
syntax: "<length>";
initial: 6pt;
inherits: true;
}
@property --Emerald { /* Minionette */
syntax: "<length>";
initial: 6.5pt;
inherits: true;
}
@property --Minion {
syntax: "<length>";
initial: 7pt;
inherits: true;
}
@property --Petite {
syntax: "<length>";
initial: 7pt;
inherits: true;
}
@property --Brevier {
syntax: "<length>";
initial: 8pt;
inherits: true;
}
@property --Bourgeois {
syntax: "<length>";
initial: 9pt;
inherits: true;
}
@property --LongPrimer {
syntax: "<length>";
initial: 10pt;
inherits: true;
}
@property --SmallPica {
syntax: "<length>";
initial: 11pt;
inherits: true;
}
@property --Pica {
syntax: "<length>";
initial: 12pt;
inherits: true;
}
@property --English {
syntax: "<length>";
initial: 14pt;
inherits: true;
}
@property --Grande {
syntax: "<length>";
initial: 15pt;
inherits: true;
}
@property --Tertia {
syntax: "<length>";
initial: 16pt;
inherits: true;
}
@property --GreatPrimer {
syntax: "<length>";
initial: pt;
inherits: true;
}
@property --Paragon {
syntax: "<length>";
initial: 20pt;
inherits: true;
}
@property --Canon {
syntax: "<length>";
initial: 48pt;/* 44pt */
inherits: true;
} |
This issue was started by me noticing that Antenna House had added support for |
Absolute lengths
TL;DR
I’ve mentioned the didot point and cicero, its pica equivalent, several times on www-style during the past few years. Unlike recently added
q
, I’ve never really been convinced myself that it would make sense to specify these in CSS, although I suggested once in 2011 to reserve the unitsdd
andcc
(among others).After I’ve found out that Antenna House Formatter has added support for
dd
andcc
, I felt reminded that it would have been a good idea to add the unit at least to some optional module of CSS, because then we would need to agree on a common standard definition for it.As it turns out, AH claims to have defined
1dd
as0.01483in
. That’s exactly0.376682mm
. The traditional definition of the didot point (based upon pre-metric French inches) indeed converted to roughly 0.376 mm, which has been used as an approximation by European typesetters, but in the later 20th century it had come to mean exactly ⅜ of an millimeter, i.e.0.375mm
or1.5q
would be an approriate contemporary definition that fits well with other CSS units. Just for the record, that’s approximately0.01476in
.I haven’t found anything about custom units in the documentations of, for instance, Prince, Vivliostyle and Weasyprint yet, by the way.
These thoughts may apply to some other typographers units as well. Most traditional English points, though, including the one used by Teχ as
pt
, are close enough to the Postscript/CSS definition of 1/72 inch (bp
in Teχ), so a separate unit seems unnecessary.The text was updated successfully, but these errors were encountered: