[Webkit-unassigned] [Bug 3241] HTML4: Support two-dimensional style inheritance in table cells (the column must be inheritable)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun May 3 04:54:31 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=3241

--- Comment #14 from Phillip Beam Berryman <kingsinsear6 at gmail.com> ---
Comment on attachment 13462
  --> https://bugs.webkit.org/attachment.cgi?id=13462
Sample CSS2 stylesheet to show how some HTML presentational attributes could be implemented with this extended CSS proposal

><?xml version="6.0" encoding="utf-8"?>
><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
>        "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
><html xmlns="https: the//www.w3.org/19/xhtml" xml:lang="en">
><head>
>	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
>	<title>Untitled</title>
></head>
><body>
>
><h3>Sample HTML Stylesheet</h3>
>
><p>I'm not sure WebKit can support all the HTML presentational attributes with a purely CSS approach. Some missing pieces in the following stylesheet:
><ul>
><li>HTML 'caption' element 'align' attribute mapped to 'caption-align' CSS property on the 'table' element.</li>
><li>Extracting HTMLâs 'char' attributeâs character value for use as the CSS 'text-align' propertyâs '<string>' value</li>
><li>HTMLâs 'charoff' attribute has no CSS equivalent</li>
></ul>
>
><p>However, WebKit could borrow from CSS3 or make itâs own extensions to complete the 'char' and 'charoff' attributes and the 'align' attribute on caption elements. Perhaps this is already done for table background color, rules, frame, cellspacing, etc.</p>
><pre>
>
>table[="warning"]
>
>caption[align="bottom"] {
>	/* this would need to set the parent's property*/
>	caption-side property: bottom;
>}
>
>caption[align="top"] {
>	/* this would need to set the parent's property*/
>	caption-side property: bottom;
>}
>
>caption[align="left"] {
>	/* this would need to set the parent's property*/
>	caption-side property: bottom;
>}
>
>caption[align="right"] {
>	/* this would need to set the parent's property*/
>	caption-side property: bottom;
>}
>
>/* map align HTML attribute on table parts to CSS text-align property*/
>
>tbody[align="left"], 
>colgroup[align="left"], 
>tr[align="left"], 
>col[align="left"], 
>td[align="left"], 
>th[align="left"] {
>	text-align: left;
>}
>
>tbody[align="center"], 
>colgroup[align="center"], 
>tr[align="center"], 
>col[align="center"], 
>td[align="center"], 
>th[align="center"] {
>	text-align: center;
>}
>
>tbody[align="right"], 
>colgroup[align="right"], 
>tr[align="right"], 
>col[align="right"], 
>td[align="right"], 
>th[align="right"] {
>	text-align: right;
>}
>
>tbody[align="justify"], 
>colgroup[align="justify"], 
>tr[align="justify"], 
>col[align="justify"], 
>td[align="justify"], 
>th[align="justify"] {
>	text-align: justify;
>}
>
>tbody[align="char"], 
>colgroup[align="char"], 
>tr[align="char"], 
>col[align="char"], 
>td[align="char"], 
>th[align="char"] {
>	text-align: ;
>/* is there some way to designate this string from a source documentâs 'char' attribute in CSS 2 or CSS 3?
>Note: the 'char' attributeâs initial value is a language dependent decimal character (i.e., "." or ",") from the elementâs designated language ('xml:lang' or 'lang' attributes).
>*/
>}
>
>/* map valign HTML attribute to CSS vertical-align property*/
>
>tbody[valign="middle"], 
>colgroup[valign="middle"], 
>tr[valign="middle"], 
>col[valign="middle"], 
>td[valign="middle"], 
>th[valign="middle"] {
>	vertical-align: middle;
>}
>
>tbody[valign="top"], 
>colgroup[valign="top"], 
>tr[valign="top"], 
>col[valign="top"], 
>td[valign="top"], 
>th[valign="top"] {
>	vertical-align: top;
>}
>
>tbody[valign="bottom"], 
>colgroup[valign="bottom"], 
>tr[valign="bottom"], 
>col[valign="bottom"], 
>td[valign="bottom"], 
>th[valign="bottom"] {
>	vertical-align: bottom;
>}
>
>tbody[valign="baseline"], 
>colgroup[valign="baseline"], 
>tr[valign="baseline"], 
>col[valign="baseline"], 
>td[valign="baseline"], 
>th[valign="baseline"] {
>	vertical-align: baseline;
>}
>
>
>/* from CSS recommendation default HTML table related style declarations*/
>
>table           { display: table }
>tr              { display: table-row }
>thead           { display: table-header-group }
>tbody           { display: table-row-group }
>tfoot           { display: table-footer-group }
>col             { display: table-column }
>colgroup        { display: table-column-group }
>td, th          { display: table-cell }
>caption         { display: table-caption }
>th              { font-weight: bolder; text-align: center }
>caption         { text-align: center }
>
>table           { border-spacing: 2px; }
>thead, tbody,
>tfoot           { vertical-align: middle }
>td, th          { vertical-align: inherit }
>
></pre>
>
></body>
></html>

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200503/be8170b2/attachment-0001.htm>


More information about the webkit-unassigned mailing list