W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2020

[csswg-drafts] [css-mediaqueries] `lang` as a media feature: Conditional requests for CSSs in multilingual web sites (#5465)

From: Anas R. via GitHub <sysbot+gh@w3.org>
Date: Mon, 24 Aug 2020 14:01:43 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-684696051-1598277702-sysbot+gh@w3.org>
anasram has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-mediaqueries] `lang` as a media feature: Conditional requests for CSSs in multilingual web sites ==
# The Problem

Imagine you have a web site supports about 100+ natural languages, every language has about 50 CSS rules (direction, align, generated content… etc). Then, you will have about 5000 CSS rules that a specific user (visitor) probably use only 1% of them.

# As a solution

I'd like to propose natural language (ISO 639-1 code) as a [CSS Media Feature](https://www.w3.org/TR/mediaqueries-4/#mq-features) to conditionally request a CSS file according to the used natural language, something like this:

```css
@media (lang: ar) {
	@import "stylesheet-ar.css";
}
```

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5465 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 24 August 2020 14:01:45 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:13 UTC