Subject: [calsify] STYLE component? Was: Proposed Errata for RFC 7986: COLOR property with arbitrary RGB values

From: "Tim Hare" <[email-masked]>
Date: Sun, 1 Jul 2018 10:46:25 -0400

I haven't been keeping up with this as I once did, apparently,  and I will
be reading RFCs again to try to find out what I'm missing.  But I want to
ask here while this COLOR description prompts me.

Why use style properties in components?  Aren't we going down the same road
HTML did prior to the introduction of CSS?  Or going even further back, not
learning from SGML?  In my opinion, it is always better to keep style
elements separately.

I would propose replacing the COLOR property with a STYLE property in RFC
7986  - something like this

============================================================================
===
5.9.  STYLE Property

   Property Name:  STYLE

   Purpose:  This property specifies a reference to a stylesheet used for 
      calendar, event, todo, or journal data.  The stylesheet will be a
standard
      CSS3 stylesheet

   Value Type:  URI

   Property Parameters: a standard URI can be used to reference where to
find the stylesheet

   Conformance:  This property can be specified once in an iCalendar
      object or in "VEVENT", "VTODO", or "VJOURNAL" calendar components.

   Description:  This property specifies a URI to a stylesheet that clients
MAY use
      when presenting the relevant data to a user.  Typically, this
stylesheet's
      primary purposes would be to provide the "background" color of events
or tasks
      when presented to the user.  The calendar client SHOULD apply the
stylesheet
      values to the calendar components in a way similar to the way a
stylesheet is
      applied to HTML tags, treating components like HTML elements and
properties like
      HTML attributes.

   Format Definition:  This property is defined by the following
      notation:

   style         = "STYLE" styleparam":" URI CRLF
                     ; Value is a valid URI

   styleparam     = *(";" other-param)

   Example:  The following is an example of this property:

   STYLE VALUE=URI:https://example.com/department_calendar.css

============================================================================
=======

Stylesheet  COULD contain

============================================================================
=======
/* Department Calendar Stylesheet */
Vcalendar{background-color:white;  font-family: Verdana, Geneva, Arial}
Vevent{background-color: white}
[organizer~='Boss']{background-color:red}
============================================================================
=======

Using CSS allows some leveraging of already developed code for displaying
things as HTML.  A calendar client
Could reformat the calendar data as HTML with a link to a stylesheet and
call the component which handles HTML mail
To display the calendar.

Using CSS also provides many more style options than just background color.

As always, I am not an official part of any WG and these ideas are my own
(although they do represent my current 
Employer, since I am self-employed).

Tim Hare
Interested Bystander, Non-Inc.

---

From: Neil Jenkins <[email-masked]>
Date: Sun, 01 Jul 2018 20:28:24 -0400

> 7986  - something like this

No. This would be ignored by everyone. A calendar app is not displaying arbitrary content where the style is entirely determined by the author. It has (normally a number of different) carefully planned and often information-dense ways of displaying multiple  events within a single time window. The COLOR property was introduced because most calendar apps colour-code different calendars in some way, and this allows the user to see the same colours when using different apps, making it easier to move between them. Arbitrary CSS is not useful or appropriate to apply here, and would range from confusing (text-decoration:underline – is that a link? why is it underlined?) to nonsensical (float:left).

Neil.