W3C home > Mailing lists > Public > public-html@w3.org > July 2007

Re: (code, sample output and keyboard/device input <code>, <samp>, <kybd>) part of my review of 3.12 Phrase elements

From: Dmitry Turin <html60@narod.ru>
Date: Fri, 27 Jul 2007 08:01:21 +0300
Message-ID: <251891274.20070727080121@narod.ru>
To: public-html@w3.org

>> I don't believe it is trivial to implement.
  We had many properties, which highlight __whole__ content of element
('text-decoration', 'text-shadow', 'text-transform', 'letter-spacing', 'word-spacing',
several properties 'font-').
  We appended __predicates__ (pseudo-elements) ':first-letter' and ':first-line',
which act with __part__ of content.
  Let's prolong this tendency, and append pseudo-elements--predicates like in parser/scaner generator
(like in bison.exe, yacc.exe/flex.exe, which is used to create compiler and interpreter),
but values of CSS-properties will be specified in these pseudo-elements--predicates
instead of arithmetical or string operations.

>> syntax highlighting rules for various
>> languages including C/C++, Java, HTML, XML, PHP, Python, Perl
They will be specified in CSS.

  code.php:pseudo-element--predicate { ... }

  <code class=php> ... <code>

>> different editors often handle syntax
>> highlighting quite differently and often produce different  
>> results.
This will be because different style sheet.

>> If a browser were to implement it, it would be required to know
>> about the syntax
RB> If it implemented it, the browser would need to know the syntax of
RB> the language.
>> For syntax highlighting to be implemented in browsers, it would
>> need to be thoroughly specified for as many languages as possible  
No, as it follows from said above.

>> Syntax highlighting for computer code would only be for a niche market.  I'd estimate
>> that well over 90% of users have no interest in code, and  
>> implementing such a complex system for a minority is hardly  
>> worthwhile.
Browser's adjustments should allow to switch-off pseudo-elements,
maybe even by hot-key,
because there exist some people (for example, i and some of my friends),
who don't understand syntax of programming languages,
until switch-off highlighting.

Dmitry Turin
HTML6     (6.3.0)  http://html6.by.ru
SQL4      (4.1.3)  http://sql40.chat.ru
Unicode2  (2.0.1)  http://unicode2.chat.ru
Computer2 (2.0.3)  http://computer20.chat.ru
Received on Friday, 27 July 2007 08:48:31 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:24 UTC