|
@@ -415,13 +415,13 @@ type
|
|
procedure Test_InlineStyle;
|
|
procedure Test_InlineStyle;
|
|
procedure Test_InlineStyle_DisplayNone;
|
|
procedure Test_InlineStyle_DisplayNone;
|
|
|
|
|
|
- // specifity
|
|
|
|
- procedure Test_Specifity_Id_Class;
|
|
|
|
- procedure Test_Specifity_Important;
|
|
|
|
- procedure Test_Specifity_Shorthand_OneRule;
|
|
|
|
- procedure Test_Specifity_Shorthand_ClassClass;
|
|
|
|
- procedure Test_Specifity_Longhand_All_Longhand;
|
|
|
|
- procedure Test_Specifity_Shorthand_All_Shorthand;
|
|
|
|
|
|
+ // Specificity
|
|
|
|
+ procedure Test_Specificity_Id_Class;
|
|
|
|
+ procedure Test_Specificity_Important;
|
|
|
|
+ procedure Test_Specificity_Shorthand_OneRule;
|
|
|
|
+ procedure Test_Specificity_Shorthand_ClassClass;
|
|
|
|
+ procedure Test_Specificity_Longhand_All_Longhand;
|
|
|
|
+ procedure Test_Specificity_Shorthand_All_Shorthand;
|
|
|
|
|
|
// origin
|
|
// origin
|
|
procedure Test_Origin_Id_Class;
|
|
procedure Test_Origin_Id_Class;
|
|
@@ -2498,7 +2498,7 @@ begin
|
|
AssertEquals('Div1.Display','none',Div1.Display);
|
|
AssertEquals('Div1.Display','none',Div1.Display);
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure TTestNewCSSResolver.Test_Specifity_Id_Class;
|
|
|
|
|
|
+procedure TTestNewCSSResolver.Test_Specificity_Id_Class;
|
|
var
|
|
var
|
|
Div1: TDemoDiv;
|
|
Div1: TDemoDiv;
|
|
begin
|
|
begin
|
|
@@ -2511,7 +2511,7 @@ begin
|
|
|
|
|
|
Doc.Style:=LinesToStr([
|
|
Doc.Style:=LinesToStr([
|
|
'.bird { left: 6px; }',
|
|
'.bird { left: 6px; }',
|
|
- '#Div1 { left: 7px; top: 8px; }', // id has higher specifity, no matter if before or after a .class
|
|
|
|
|
|
+ '#Div1 { left: 7px; top: 8px; }', // id has higher Specificity, no matter if before or after a .class
|
|
'.bird { top: 9px; }',
|
|
'.bird { top: 9px; }',
|
|
'']);
|
|
'']);
|
|
ApplyStyle;
|
|
ApplyStyle;
|
|
@@ -2520,7 +2520,7 @@ begin
|
|
AssertEquals('Div1.Top','8px',Div1.Top);
|
|
AssertEquals('Div1.Top','8px',Div1.Top);
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure TTestNewCSSResolver.Test_Specifity_Important;
|
|
|
|
|
|
+procedure TTestNewCSSResolver.Test_Specificity_Important;
|
|
var
|
|
var
|
|
Div1: TDemoDiv;
|
|
Div1: TDemoDiv;
|
|
begin
|
|
begin
|
|
@@ -2542,7 +2542,7 @@ begin
|
|
AssertEquals('Div1.Top','9px',Div1.Top);
|
|
AssertEquals('Div1.Top','9px',Div1.Top);
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure TTestNewCSSResolver.Test_Specifity_Shorthand_OneRule;
|
|
|
|
|
|
+procedure TTestNewCSSResolver.Test_Specificity_Shorthand_OneRule;
|
|
var
|
|
var
|
|
Div1: TDemoDiv;
|
|
Div1: TDemoDiv;
|
|
begin
|
|
begin
|
|
@@ -2559,7 +2559,7 @@ begin
|
|
AssertEquals('Div1.BorderWidth','7px',Div1.BorderWidth);
|
|
AssertEquals('Div1.BorderWidth','7px',Div1.BorderWidth);
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure TTestNewCSSResolver.Test_Specifity_Shorthand_ClassClass;
|
|
|
|
|
|
+procedure TTestNewCSSResolver.Test_Specificity_Shorthand_ClassClass;
|
|
var
|
|
var
|
|
Div1: TDemoDiv;
|
|
Div1: TDemoDiv;
|
|
begin
|
|
begin
|
|
@@ -2581,7 +2581,7 @@ begin
|
|
AssertEquals('Div1.BorderWidth','7px',Div1.BorderWidth);
|
|
AssertEquals('Div1.BorderWidth','7px',Div1.BorderWidth);
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure TTestNewCSSResolver.Test_Specifity_Longhand_All_Longhand;
|
|
|
|
|
|
+procedure TTestNewCSSResolver.Test_Specificity_Longhand_All_Longhand;
|
|
var
|
|
var
|
|
Div1: TDemoDiv;
|
|
Div1: TDemoDiv;
|
|
begin
|
|
begin
|
|
@@ -2605,7 +2605,7 @@ begin
|
|
AssertEquals('Div1.Background','red',Div1.Background);
|
|
AssertEquals('Div1.Background','red',Div1.Background);
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure TTestNewCSSResolver.Test_Specifity_Shorthand_All_Shorthand;
|
|
|
|
|
|
+procedure TTestNewCSSResolver.Test_Specificity_Shorthand_All_Shorthand;
|
|
var
|
|
var
|
|
Div1, Div2: TDemoDiv;
|
|
Div1, Div2: TDemoDiv;
|
|
begin
|
|
begin
|