suxin2017
suxin2017
System: OS: Windows 10 10.0.19044 CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz Memory: 6.35 GB / 15.81 GB Binaries: Node: 16.20.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD...
> **BFC(Block formatting contexts):块级格式上下文** > 页面上的一个隔离的渲染区域,那么他是如何产生的呢?可以触发BFC的元素有float、position、overflow、display:table-cell/ inline-block/table-caption ;BFC有什么作用呢?比如说实现多栏布局’ > > **IFC(Inline formatting contexts):内联格式上下文** > IFC的line box(线框)高度由其包含行内元素中最高的实际高度计算而来(不受到竖直方向的padding/margin影响)IFC中的line box一般左右都贴紧整个IFC,但是会因为float元素而扰乱。float元素会位于IFC与与line box之间,使得line box宽度缩短。 同个ifc下的多个line box高度会不同 > IFC中时不可能有块级元素的,当插入块级元素时(如p中插入div)会产生两个匿名块与div分隔开,即产生两个IFC,每个IFC对外表现为块级元素,与div垂直排列。 > 那么IFC一般有什么用呢? > 水平居中:当一个块要在环境中水平居中时,设置其为inline-block则会在外层产生IFC,通过text-align则可以使其水平居中。 > 垂直居中:创建一个IFC,用其中一个元素撑开父元素的高度,然后设置其vertical-align:middle,其他行内元素则可以在此父元素下垂直居中。 >...
please assign this to me
> @suxin2017 Could you work on another issue? I'll send a PR within a few days. 👌
Hello can I join this task, I have written a similar css parser Here it is https://github.com/suxin2017/css-tutorial/blob/main/crates/css_tutorial/src/parser.rs
[https://drafts.csswg.org/css-syntax/#consume-simple-block](https://drafts.csswg.org/css-syntax/#consume-simple-block) Ok, let me finish this part
parse simple block https://drafts.csswg.org/css-syntax/#consume-simple-block parse declaration https://csstree.github.io/docs/syntax/#Type:declaration parse declaration list https://csstree.github.io/docs/syntax/#Type:declaration-list parse function https://drafts.csswg.org/css-syntax/#consume-function I've done that
If we use all css module level 3 syntax for parsing, Wouldn't it be better to put the validation of the rules into the analyze module Because modern css syntax...
> > If we use all css module level 3 syntax for parsing, > > Wouldn't it be better to put the validation of the rules into the analyze module...
I implemented a very rough draft implementation, all the tests have passed, do you feel that such a loose cst will help us https://github.com/biomejs/biome/pull/1224