Browse Source
CSS is widely used, motivating it being included as a built-in pattern. It must be noted that the word_regex for CSS (i.e. the regex defining what is a word in the language) does not consider '.' and '#' characters (in CSS selectors) to be part of the word. This behavior is documented by the test t/t4018/css-rule. The logic behind this behavior is the following: identifiers in CSS selectors are identifiers in a HTML/XML document. Therefore, the '.'/'#' character are not part of the identifier, but an indicator of the nature of the identifier in HTML/XML (class or id). Diffing ".class1" and ".class2" must show that the class name is changed, but we still are selecting a class. Logic behind the "pattern" regex is: 1. reject lines ending with a colon/semicolon (properties) 2. if a line begins with a name in column 1, pick the whole line Credits to Johannes Sixt (j6t@kdbg.org) for the pattern regex and most of the tests. Signed-off-by: William Duclot <william.duclot@ensimag.grenoble-inp.fr> Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr> Reviewed-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
William Duclot
9 years ago
committed by
Junio C Hamano
15 changed files with 90 additions and 0 deletions
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
RIGHT label.control-label |
||||
{ |
||||
margin-top: 10px!important; |
||||
border : 10px ChangeMe #C6C6C6; |
||||
} |
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
RIGHT h1 { |
||||
color: |
||||
ChangeMe; |
||||
} |
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
RIGHT a:hover { |
||||
margin-top: |
||||
10px!important; |
||||
border : 10px ChangeMe #C6C6C6; |
||||
} |
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
RIGHT label.control-label { |
||||
margin-top: 10px!important; |
||||
border : 10px ChangeMe #C6C6C6; |
||||
} |
@ -0,0 +1,6 @@
@@ -0,0 +1,6 @@
|
||||
p.header, |
||||
label.control-label, |
||||
div ul#RIGHT { |
||||
margin-top: 10px!important; |
||||
border : 10px ChangeMe #C6C6C6; |
||||
} |
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
RIGHT, label.control-label { |
||||
margin-top: 10px!important; |
||||
padding: 0; |
||||
border : 10px ChangeMe #C6C6C6; |
||||
} |
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
label.control, div ul#RIGHT { |
||||
margin-top: 10px!important; |
||||
border : 10px ChangeMe #C6C6C6; |
||||
} |
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
RIGHT label.control-label { |
||||
margin:10px; |
||||
padding:10px; |
||||
border : 10px ChangeMe #C6C6C6; |
||||
} |
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
<BOLD>diff --git a/pre b/post<RESET> |
||||
<BOLD>index b8ae0bb..fe500b7 100644<RESET> |
||||
<BOLD>--- a/pre<RESET> |
||||
<BOLD>+++ b/post<RESET> |
||||
<CYAN>@@ -1,10 +1,10 @@<RESET> |
||||
.<RED>class-form<RESET><GREEN>other-form<RESET> label.control-label { |
||||
margin-top: <RED>10<RESET><GREEN>15<RESET>px!important; |
||||
border : 10px <RED>dashed<RESET><GREEN>dotted<RESET> #C6C6C6; |
||||
}<RESET> |
||||
<RED>#CCCCCC<RESET><GREEN>#CCCCCB<RESET> |
||||
10em<RESET> |
||||
<RED>padding-bottom<RESET><GREEN>margin-left<RESET> |
||||
150<RED>px<RESET><GREEN>em<RESET> |
||||
10px |
||||
<RED>!important<RESET> |
||||
<RED>div<RESET><GREEN>li<RESET>.class#id |
@ -0,0 +1,10 @@
@@ -0,0 +1,10 @@
|
||||
.other-form label.control-label { |
||||
margin-top: 15px!important; |
||||
border : 10px dotted #C6C6C6; |
||||
} |
||||
#CCCCCB |
||||
10em |
||||
margin-left |
||||
150em |
||||
10px |
||||
li.class#id |
@ -0,0 +1,10 @@
@@ -0,0 +1,10 @@
|
||||
.class-form label.control-label { |
||||
margin-top: 10px!important; |
||||
border : 10px dashed #C6C6C6; |
||||
} |
||||
#CCCCCC |
||||
10em |
||||
padding-bottom |
||||
150px |
||||
10px!important |
||||
div.class#id |
Loading…
Reference in new issue