-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logical Properties and Values #52
Comments
2. Flow-Relative Values
能接受 physical directional 关键字(
说明:
https://www.w3.org/TR/2018/WD-css-logical-1-20180827/#directional-keywords |
3. Flow-Relative Page Classifications
CSS 里,所有的页面都被 user agents 分类为 left pages 或 right pages。然而,哪个 page 先展开,取决于 page progression 是 left-to-right 还是 right-to-left 的。 为了能控制页面的 page breaking 是先/后展开的一边,而不是展开的左/右侧,本模块给属性``和
page selectors 也增加了 flow-relative page selection(
已有的两个是
|
4. Flow-Relative Box Model Properties此规范引入了新的 CSS 属性,physical box model properties ~ flow-relative。每组相关的 flow-relative longhand properties 及其并行的 physical properties 形成一个 logical property group(逻辑属性组)。比如,
flow-relative properties 的 specified values 不同于 physical properties 的,但是 flow-relative 和 physical properties 共享 computed values。哪对 properties 共享 computed values 取决于元素的
有 flow-relative 和 physical properties 的 computed value 是通过将 CSS 级联应用于两者的 declaration 来确定的。覆盖不取决于 declaration 是 flow-relative 还是 physical 的,而只取决于 CSS cascade 的规则。
CSSOM APIs 在返回 computed values 时(比如
|
|
Issue 3519Issue 3519 提出:这两个简写属性的值怎么只有一个?
These two shorthand properties set the 原来,早在 CSS3 的
规范中有说明: ...Unlike the shorthand
|
|
CSS Logical Properties and Values Level 1
logical properties and values 让 author 可以通过 logical direction 和 dimension mappings 来控制 layout,而不是通过 physical 的。
1. Introduction
不同的 writing systems 有不同的 directions,所以存在多种 writing modes #51:
logical 概念,比如页面的 start 或 line map,与 physical 概念,对应行的 top 或者段落的 left edge,是不同的。layout 的一些方面实际上是相对于 writing directions 的,所以,页面被翻译成不同的 system 时,layout 的这些方面会有所不同;另外的方面,本质上是相对于页面的 physical orientation。
比如,lists, headings 和 paragraphs 在 English 里通常是 left-aligned,但实际上它们是 start-aligned,因为在 Arabic(阿拉伯语)中相同的结构是 right-aligned。multilingual document(多语言文档)需要适应这两种 writing systems。
下面的示例,可以很好的演示使用 logical syntax 能让你很好的适配不同的 writing systems。
文档可能同时需要 logical 和 physical 属性。例如,按钮的 drop shadows 必须始终保持一致,所以它们的 offset 将根据 visual considerations 和 physical directions 来确定,而不会因为 writing system 的不同而不同。
由于 CSS 最初只设计了 physical coordinates(物理坐标),因此本模块引入了 text-flow–relative 等价物,以便 CSS 样式表中的 declarations 可以用 flow-relative 术语来表达。它定义了 equivalent properties 的 mapping 和 cascading,一些与 CSS2.1 中等价的新 properties 和 values,以及用于派生其语法的原则。未来的 CSS 规范有望在其属性和值的定义中包含两组 coordinates,因此该模块不会跟踪新 CSS 特性的 flow-relative 变体的引入。
CSS Writing Modes 的 Abstract Box Terminology 章节定义了 flow-relative 和 physical 术语的 mapping。这个 mapping 这取决于所使用的
writing-mode
和direction
的值,控制 flow-relative 关键字和属性的解释。https://www.w3.org/TR/2018/WD-css-logical-1-20180827
The text was updated successfully, but these errors were encountered: