Community Wishlist Survey 2023/Miscellaneous/Update TemplateStyles CSS rules to current CSS spec versions: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
fix translation
Line 1: Line 1:
{{Community Wishlist Survey/Proposal header|1=Allowing CSS Logical Properties and Values ​​in TemplateStyles}}
{{Community Wishlist Survey/Proposal header|1=Allow CSS logical properties and values ​​in TemplateStyles}}
<!-- DO NOT EDIT ABOVE THIS LINE -- この線から上は編集対象ではありません。 -->
<!-- DO NOT EDIT ABOVE THIS LINE -- この線から上は編集対象ではありません。 -->
* '''Problem''':In CSS, to control the direction-independent layout of content, see CSS Logical Properties and Values ​​[https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties CSS Logical Properties and Values], abbreviated to logical property below.). However, when I use logical properties in TemplateStyles, I get a warning "Warning: Unknown property: '*****'." If you ignore the warning and try to save, an "Unrecognized or unsupported property" error will be displayed and you will not be able to save.
* '''Problem''': In CSS, in order to control the direction-independent layout of content, you have to use CSS logical properties and values (see [https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties CSS Logical Properties and Values]; henceforth "logical properties"). However, using logical properties in TemplateStyles results in a warning saying "Warning: Unknown property: '*****'." If you ignore the warning and try to save, an "Unrecognized or unsupported property" error will be displayed and you will not be able to save.
* '''Proposed solution''': Make logical properties available in TemplateStyles except for experimental or deprecated ones.

* '''Who is it useful for''': Users who want to use dynamic layout to toggle between vertical and horizontal text display on Japanese Wikisource (and I think Chinese Wikisource too).
* '''Proposed solution''': Makes logical properties available in TemplateStyles, except for experimental/deprecated properties.
* '''More comments''': Japanese Wikisource is currently testing vertical text display with dynamic layout. (See e.g. [[wikisource:ja:枕草紙_(國文大觀)]] for actual behavior.)
* '''Who is it useful for''': Users who want to use dynamic layout to switch between vertical and horizontal text display on Japanese Wikisource (probably Chinese Wikisource also applies) I think you will.)
Logical properties are essential for toggling between horizontal and vertical writing display of content without ruining the layout. However, because of the limitations described above, templates that specify the layout currently have no choice but to specify logical properties in style attributes (e.g. [[Wikisource:ja:テンプレート:Right|Template:Right]]). This is undesirable in view of the principle of separation of presentation and structure. It is frustrating to not be able to take advantage of TemplateStyles and [[Wikisource:en:Help:Page styles|Page styles]] to the full extent when it comes to direction-independent layouts. (It's also inconsistent that properties that can't be used in TemplateStyles are still available in style attributes in the first place.)

* '''More comments''': Japanese Wikisource is currently testing vertical text with dynamic layout. (Please check [[wikisource:en:Makura Zoshi_(Kokubundaikan)]] etc.)
To arbitrarily switch between horizontal and vertical text without breaking the layout, the use of logical properties is essential. However, due to the above restrictions, the template that specifies the layout has no choice but to specify the logical property with the style attribute. (e.g. [[Wikisource:ja:template:Right|template:Right]]) This is not good from the point of view of the principle of separation of presentation and structure. Given the orientation independence of layouts, I find it frustrating that TemplateStyles and [[Wikisource:en:Help:Page styles|Page styles]] cannot be actively used. (In the first place, I think it's inconsistent that properties that can't be used with TemplateStyles can be used with the style attribute.)

* '''Phabricator tickets''': [[phab:T322482]]<!-- Phabricator チケットを思いつかない、もしくは意味がわからない場合は空欄のままにします。 -->
* '''Phabricator tickets''': [[phab:T322482]]<!-- Phabricator チケットを思いつかない、もしくは意味がわからない場合は空欄のままにします。 -->
* '''Proposer''': [[User:Likibp|Likibp]] ([[User talk:Likibp|talk]]) 16:57, 31 January 2023 (UTC)
* '''Proposer''': [[User:Likibp|Likibp]] ([[User talk:Likibp|talk]]) 16:57, 31 January 2023 (UTC)

Revision as of 16:52, 1 February 2023

Allow CSS logical properties and values ​​in TemplateStyles

  • Problem: In CSS, in order to control the direction-independent layout of content, you have to use CSS logical properties and values (see CSS Logical Properties and Values; henceforth "logical properties"). However, using logical properties in TemplateStyles results in a warning saying "Warning: Unknown property: '*****'." If you ignore the warning and try to save, an "Unrecognized or unsupported property" error will be displayed and you will not be able to save.
  • Proposed solution: Make logical properties available in TemplateStyles except for experimental or deprecated ones.
  • Who is it useful for: Users who want to use dynamic layout to toggle between vertical and horizontal text display on Japanese Wikisource (and I think Chinese Wikisource too).
  • More comments: Japanese Wikisource is currently testing vertical text display with dynamic layout. (See e.g. wikisource:ja:枕草紙_(國文大觀) for actual behavior.)

Logical properties are essential for toggling between horizontal and vertical writing display of content without ruining the layout. However, because of the limitations described above, templates that specify the layout currently have no choice but to specify logical properties in style attributes (e.g. Template:Right). This is undesirable in view of the principle of separation of presentation and structure. It is frustrating to not be able to take advantage of TemplateStyles and Page styles to the full extent when it comes to direction-independent layouts. (It's also inconsistent that properties that can't be used in TemplateStyles are still available in style attributes in the first place.)

Discussion