Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3a7b787

Browse files
committed
Add missing CSS properties : margin-block, pading-block, scroll-behavior, conic-gradient, filter-effects
Closes:#7010
1 parent304cbec commit3a7b787

File tree

15 files changed

+302
-10
lines changed

15 files changed

+302
-10
lines changed

‎ide/css.editor/src/org/netbeans/modules/css/editor/module/main/Bundle.properties‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ css-module-displayname-fragmentation=Fragmentation
5656
css-module-displayname-positioning=Positioning
5757
css-module-displayname-sizing=Sizing
5858
css-module-displayname-contain=Containment
59+
css-module-displayname-overflow=Overflow
60+
css-module-displayname-filter_effects=Filter Effects
61+
css-module-displayname-scroll_snap=Scroll Snap
5962

6063
completion-help-no-documentation-found=No documentation found
6164

‎ide/css.editor/src/org/netbeans/modules/css/editor/module/main/DefaultCssEditorModule.java‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ public class DefaultCssEditorModule extends CssEditorModule {
8888
module("text","http://www.w3.org/TR/css-text-4"),//NOI18N
8989
module("writing_modes","http://www.w3.org/TR/css3-writing-modes"),//NOI18N
9090
module("generated_content_for_paged_media","http://www.w3.org/TR/css3-gcpm"),//NOI18N
91+
module("filter_effects","https://www.w3.org/TR/filter-effects-1/"),//NOI18N
9192
module("fonts","http://www.w3.org/TR/css3-fonts"),//NOI18N
9293
module("basic_box_model","http://www.w3.org/TR/css3-box"),//NOI18N
9394
module("speech","http://www.w3.org/TR/css3-speech"),//NOI18N
@@ -105,6 +106,8 @@ public class DefaultCssEditorModule extends CssEditorModule {
105106
module("alignment","http://www.w3.org/TR/css-align-3"),//NOI18N
106107
module("fragmentation","http://www.w3.org/TR/css-break-3"),//NOI18N
107108
module("positioning","http://www.w3.org/TR/css-position-3"),//NOI18N
109+
module("overflow","https://www.w3.org/TR/css-overflow-3/"),//NOI18N
110+
module("scroll_snap","https://drafts.csswg.org/css-scroll-snap/"),//NOI18N
108111
module("sizing","http://www.w3.org/TR/css-sizing-3"),//NOI18N
109112
module("contain","http://www.w3.org/TR/css-contain-3"),//NOI18N
110113
module("other",null)//NOI18N

‎ide/css.editor/src/org/netbeans/modules/css/editor/module/main/properties/basic_box_model.properties‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ margin-right=<box-edge-size>
4949
margin-bottom=<box-edge-size>
5050
margin-left=<box-edge-size>
5151

52+
margin-block=<box-edge-size>{1,2}
53+
margin-block-start=<box-edge-size>
54+
margin-block-end=<box-edge-size>
55+
56+
margin-inline=<box-edge-size>{1,2}
57+
margin-inline-start=<box-edge-size>
58+
margin-inline-end=<box-edge-size>
5259
# --- padding ---
5360
padding=[<box-edge-size>]{1,4} | <var-fn>
5461

@@ -57,6 +64,13 @@ padding-right=<box-edge-size>
5764
padding-bottom=<box-edge-size>
5865
padding-left=<box-edge-size>
5966

67+
padding-block=<box-edge-size>{1,2}
68+
padding-block-start=<box-edge-size>
69+
padding-block-end=<box-edge-size>
70+
71+
padding-inline=<box-edge-size>{1,2}
72+
padding-inline-start=<box-edge-size>
73+
padding-inline-end=<box-edge-size>
6074
@box-edge-size=<length> | <percentage> | auto
6175
# ------
6276

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# CSS Box Filter Effects Module
19+
20+
$category=filter_effects
21+
22+
backdrop-filter =<filter-value-list> | <var-fn> | none
23+
24+
@filter-value-list =[<filter-function> | <uri>]+
25+
26+
@filter-function =<blur> | <brightness> | <contrast> | <drop-shadow> | \
27+
<grayscale> | <hue-rotate> | <invert> | <opacity> | <sepia> | <saturate>
28+
@blur =blur ( <length> )
29+
@brightness =brightness ( <length-percentage> )
30+
@contrast =contrast ( <length-percentage> )
31+
@drop-shadow =drop-shadow ( [ <color>? && <length>{2,3} ] )
32+
@grayscale =grayscale ( <length-percentage> )
33+
@hue-rotate =hue-rotate ( <angle> | <var-fn> )
34+
@invert =invert ( <length-percentage>)
35+
@opacity =opacity ( <length-percentage> )
36+
@sepia =sepia ( <length-percentage>)
37+
@saturate =saturate ( <length-percentage> )

‎ide/css.editor/src/org/netbeans/modules/css/editor/module/main/properties/image_values.properties‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ $category=images
3333
#-image-combination= cross-fade ( <image>, <image>, <percentage> )
3434
@image-combination=cross-fade ( [!anything]* )
3535

36-
@gradient=[ <linear-gradient> | <radial-gradient> | <repeating-linear-gradient> | <repeating-radial-gradient> ]
36+
@gradient=[ <linear-gradient> | <radial-gradient> | <conic-gradient> | <repeating-linear-gradient> | <repeating-radial-gradient> ]
3737

3838
@linear-gradient =linear-gradient ( \
3939
[ [ \
@@ -56,6 +56,19 @@ $category=images
5656
<color-stop> [ , <color-stop>]+ \
5757
)
5858

59+
@conic-gradient =conic-gradient ( <angular-color> [, <angular-color> ]* )
60+
61+
@angular-color =[ <color> [<angle-percentage>{1,2}]? ] | [ [ from <angle-percentage> ]? [ [ at [<bg-pos> ]{1,2} ] |\
62+
[ in [ <rectangular-color-space> | [ <polar-color-space> <hue-interpolation-method>? ] ] ] ]? ]
63+
64+
@angle-percentage =<angle> | <percentage> | <var-fn>
65+
66+
@rectangular-color-space =srgb | srgb-linear | display-p3 | display-p3-linear | a98-rgb | prophoto-rgb | rec2020 | lab | oklab | <var-fn>
67+
68+
@polar-color-space =hsl | hwb | lch | oklch | <var-fn>
69+
70+
@hue-interpolation-method =[ shorter | longer | increasing | decreasing | <var-fn> ] hue
71+
5972
@repeating-linear-gradient=repeating-linear-gradient ( \
6073
[ [ \
6174
[ [top | bottom] || [left | right] ] \
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# CSS Box Overflow Module
19+
20+
$category=overflow
21+
22+
scroll-behavior =auto | smooth | <var-fn>
23+
24+
scroll-margin =<scroll-margin-value>{1,4}
25+
scroll-padding =<scroll-padding-value>{1,4}
26+
27+
scroll-margin-block =<scroll-margin-value>{1,2}
28+
scroll-padding-block =<scroll-padding-value>{1,2}
29+
30+
scroll-margin-inline =<scroll-margin-value>{1,2}
31+
scroll-padding-inline =<scroll-padding-value>{1,2}
32+
33+
scroll-margin-top =<scroll-margin-value>
34+
scroll-margin-bottom =<scroll-margin-value>
35+
scroll-margin-left =<scroll-margin-value>
36+
scroll-margin-right =<scroll-margin-value>
37+
38+
scroll-padding-top =<scroll-padding-value>
39+
scroll-padding-bottom =<scroll-padding-value>
40+
scroll-padding-left =<scroll-padding-value>
41+
scroll-padding-right =<scroll-padding-value>
42+
43+
@scroll-margin-value =<length>
44+
@scroll-padding-value =<length-percentage> | auto
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# CSS Scroll Snap Module
19+
20+
$category=overflow
21+
22+
scroll-snap-type =none | [ [ x | y | block | inline | both | <var-fn>] [ mandatory | proximity | <var-fn> ]? ]
23+
scroll-snap-align =[ none | start | end | center | <var-fn> ]{1,2}

‎ide/css.editor/test/unit/src/org/netbeans/modules/css/editor/module/main/BasicBoxModelModuleTest.java‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,27 @@ public void testMargin_Model() {
5959

6060
}
6161

62+
publicvoidtestMarginBlock() {
63+
assertPropertyDeclaration("margin-block: 1px");
64+
assertPropertyDeclaration("margin-block-start: 1px");
65+
assertPropertyDeclaration("margin-block-end: 2px");
66+
}
67+
68+
publicvoidtestMarginInline() {
69+
assertPropertyDeclaration("margin-inline: 1px");
70+
assertPropertyDeclaration("margin-inline-start: 1px");
71+
assertPropertyDeclaration("margin-inline-end: 2px");
72+
}
73+
74+
publicvoidtestPaddingBlock() {
75+
assertPropertyDeclaration("padding-block: 1px");
76+
assertPropertyDeclaration("padding-block-start: 1px");
77+
assertPropertyDeclaration("padding-block-end: 2px");
78+
}
79+
80+
publicvoidtestPaddingInline() {
81+
assertPropertyDeclaration("padding-inline: 1px");
82+
assertPropertyDeclaration("padding-inline-start: 1px");
83+
assertPropertyDeclaration("padding-inline-end: 2px");
84+
}
6285
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
packageorg.netbeans.modules.css.editor.module.main;
20+
21+
publicclassFilterEffectsModuleTestextendsCssModuleTestBase {
22+
23+
publicFilterEffectsModuleTest(StringtestName) {
24+
super(testName);
25+
}
26+
27+
publicvoidtestBackdropFilter() {
28+
assertPropertyDeclaration("backdrop-filter: none");
29+
assertPropertyDeclaration("backdrop-filter: blur(2px)");
30+
assertPropertyDeclaration("backdrop-filter: brightness(60%)");
31+
assertPropertyDeclaration("backdrop-filter: contrast(40%)");
32+
assertPropertyDeclaration("backdrop-filter: drop-shadow(4px 4px 10px blue)");
33+
assertPropertyDeclaration("backdrop-filter: drop-shadow(red 1rem 1rem 10px)");
34+
assertPropertyDeclaration("backdrop-filter: grayscale(var(--percentage))");
35+
assertPropertyDeclaration("backdrop-filter: grayscale(30%)");
36+
}
37+
38+
}

‎ide/css.editor/test/unit/src/org/netbeans/modules/css/editor/module/main/ImageValuesModuleTest.java‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@ public void testProperties() {
5454
assertPropertyDeclaration("@repeating-radial-gradient:repeating-radial-gradient(20px 30px, circle contain, red, yellow, green 100%, yellow 150%, red 200%)");
5555
assertPropertyDeclaration("@repeating-radial-gradient:repeating-radial-gradient(red, blue 20px, red 40px)");
5656

57-
58-
59-
57+
assertPropertyDeclaration("@image: conic-gradient(from 40deg, white, black)");
58+
assertPropertyDeclaration("@image: conic-gradient(red 36deg, orange 36deg 170deg, yellow 170deg)");
59+
assertPropertyDeclaration("@image: conic-gradient(var(--color) var(--angle))");
60+
assertPropertyDeclaration("@image: conic-gradient(at 60px 20%, coral, orange, coral)");
61+
assertPropertyDeclaration("@image: conic-gradient(from 45deg in oklch, white, black, white)");
6062
}
6163

6264
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp