tools/css: Require semicolons after CSS declarations.

This commit is contained in:
Steve Howell 2017-03-14 08:18:40 -07:00 committed by showell
parent a1d7e1b5f6
commit 2ffea94bd8
5 changed files with 73 additions and 70 deletions

View File

@ -430,7 +430,7 @@ li.show-more-topics a {
}
li.show-more-private-messages a {
font-size: 90%
font-size: 90%;
}
.zoom-in .show-more-topics {

View File

@ -278,7 +278,7 @@ img.screenshot {
}
.def:before {
content:" - "
content: " - ";
}
.api-details {
@ -286,7 +286,7 @@ img.screenshot {
}
.api-details ul {
list-style-type:none
list-style-type: none;
}
.api-details dd {
@ -337,7 +337,7 @@ img.screenshot {
}
.platform-icon {
width: 33%
width: 33%;
}
.portico-page h1 {
@ -1302,7 +1302,7 @@ a.bottom-signup-button {
.markdown .indicator.orange {
border: 1px solid #ec7e18;
background: linear-gradient(to bottom,rgba(255,255,255,0) 50%,rgba(236,126,24,1) 50%)
background: linear-gradient(to bottom,rgba(255,255,255,0) 50%,rgba(236,126,24,1) 50%);
}
.markdown .indicator.green {

View File

@ -1,64 +1,64 @@
.codehilite pre { background-color: #fff; -webkit-font-smoothing: auto }
.codehilite .hll { background-color: #ffffcc }
.codehilite pre { background-color: #fff; -webkit-font-smoothing: auto; }
.codehilite .hll { background-color: #ffffcc; }
.codehilite { background: #f8f8f8; }
.codehilite .c { color: #408080; font-style: italic } /* Comment */
.codehilite .err { border: 1px solid #FF0000 } /* Error */
.codehilite .c { color: #408080; font-style: italic; } /* Comment */
.codehilite .err { border: 1px solid #FF0000; } /* Error */
.codehilite .k { color: #a71d5d; } /* Keyword */
.codehilite .o { color: #a71d5d } /* Operator */
.codehilite .cm { color: #408080; font-style: italic } /* Comment.Multiline */
.codehilite .cp { color: #BC7A00 } /* Comment.Preproc */
.codehilite .c1 { color: #aaa; font-style: italic } /* Comment.Single */
.codehilite .cs { color: #408080; font-style: italic } /* Comment.Special */
.codehilite .gd { color: #A00000 } /* Generic.Deleted */
.codehilite .ge { font-style: italic } /* Generic.Emph */
.codehilite .gr { color: #FF0000 } /* Generic.Error */
.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.codehilite .gi { color: #00A000 } /* Generic.Inserted */
.codehilite .go { color: #808080 } /* Generic.Output */
.codehilite .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.codehilite .gs { font-weight: bold } /* Generic.Strong */
.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.codehilite .gt { color: #0040D0 } /* Generic.Traceback */
.codehilite .kc { color: #a71d5d; font-weight: bold } /* Keyword.Constant */
.codehilite .kd { color: #a71d5d } /* Keyword.Declaration */
.codehilite .kn { color: #a71d5d; font-weight: bold } /* Keyword.Namespace */
.codehilite .kp { color: #a71d5d } /* Keyword.Pseudo */
.codehilite .kr { color: #a71d5d; font-weight: bold } /* Keyword.Reserved */
.codehilite .kt { color: #a71d5d } /* Keyword.Type */
.codehilite .m { color: #666666 } /* Literal.Number */
.codehilite .s { color: #6ea22c } /* Literal.String */
.codehilite .na { color: #7D9029 } /* Name.Attribute */
.codehilite .nb { color: #0086b3 } /* Name.Builtin */
.codehilite .nc { color: #795da3; font-weight: bold } /* Name.Class */
.codehilite .no { color: #880000 } /* Name.Constant */
.codehilite .nd { color: #AA22FF } /* Name.Decorator */
.codehilite .ni { color: #999999; font-weight: bold } /* Name.Entity */
.codehilite .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
.codehilite .nf { color: #795da3 } /* Name.Function */
.codehilite .nl { color: #A0A000 } /* Name.Label */
.codehilite .nn { color: #795da3; font-weight: bold } /* Name.Namespace */
.codehilite .nt { color: #008000; font-weight: bold } /* Name.Tag */
.codehilite .nv { color: #19177C } /* Name.Variable */
.codehilite .nx { color: #444 } /* Not sure? */
.codehilite .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.codehilite .w { color: #bbbbbb } /* Text.Whitespace */
.codehilite .mf { color: #0086b3 } /* Literal.Number.Float */
.codehilite .mh { color: #0086b3 } /* Literal.Number.Hex */
.codehilite .mi { color: #0086b3 } /* Literal.Number.Integer */
.codehilite .mo { color: #0086b3 } /* Literal.Number.Oct */
.codehilite .sb { color: #6ea22c } /* Literal.String.Backtick */
.codehilite .sc { color: #6ea22c } /* Literal.String.Char */
.codehilite .sd { color: #6ea22c; font-style: italic } /* Literal.String.Doc */
.codehilite .s2 { color: #183691 } /* Literal.String.Double */
.codehilite .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
.codehilite .sh { color: #6ea22c } /* Literal.String.Heredoc */
.codehilite .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
.codehilite .sx { color: #008000 } /* Literal.String.Other */
.codehilite .sr { color: #3aaec3 } /* Literal.String.Regex */
.codehilite .s1 { color: #6ea22c } /* Literal.String.Single */
.codehilite .ss { color: #19177C } /* Literal.String.Symbol */
.codehilite .bp { color: #008000 } /* Name.Builtin.Pseudo */
.codehilite .vc { color: #19177C } /* Name.Variable.Class */
.codehilite .vg { color: #19177C } /* Name.Variable.Global */
.codehilite .vi { color: #19177C } /* Name.Variable.Instance */
.codehilite .il { color: #666666 } /* Literal.Number.Integer.Long */
.codehilite .o { color: #a71d5d; } /* Operator */
.codehilite .cm { color: #408080; font-style: italic; } /* Comment.Multiline */
.codehilite .cp { color: #BC7A00; } /* Comment.Preproc */
.codehilite .c1 { color: #aaa; font-style: italic; } /* Comment.Single */
.codehilite .cs { color: #408080; font-style: italic; } /* Comment.Special */
.codehilite .gd { color: #A00000; } /* Generic.Deleted */
.codehilite .ge { font-style: italic; } /* Generic.Emph */
.codehilite .gr { color: #FF0000; } /* Generic.Error */
.codehilite .gh { color: #000080; font-weight: bold; } /* Generic.Heading */
.codehilite .gi { color: #00A000; } /* Generic.Inserted */
.codehilite .go { color: #808080; } /* Generic.Output */
.codehilite .gp { color: #000080; font-weight: bold; } /* Generic.Prompt */
.codehilite .gs { font-weight: bold; } /* Generic.Strong */
.codehilite .gu { color: #800080; font-weight: bold; } /* Generic.Subheading */
.codehilite .gt { color: #0040D0; } /* Generic.Traceback */
.codehilite .kc { color: #a71d5d; font-weight: bold; } /* Keyword.Constant */
.codehilite .kd { color: #a71d5d; } /* Keyword.Declaration */
.codehilite .kn { color: #a71d5d; font-weight: bold; } /* Keyword.Namespace */
.codehilite .kp { color: #a71d5d; } /* Keyword.Pseudo */
.codehilite .kr { color: #a71d5d; font-weight: bold; } /* Keyword.Reserved */
.codehilite .kt { color: #a71d5d; } /* Keyword.Type */
.codehilite .m { color: #666666; } /* Literal.Number */
.codehilite .s { color: #6ea22c; } /* Literal.String */
.codehilite .na { color: #7D9029; } /* Name.Attribute */
.codehilite .nb { color: #0086b3; } /* Name.Builtin */
.codehilite .nc { color: #795da3; font-weight: bold; } /* Name.Class */
.codehilite .no { color: #880000; } /* Name.Constant */
.codehilite .nd { color: #AA22FF; } /* Name.Decorator */
.codehilite .ni { color: #999999; font-weight: bold; } /* Name.Entity */
.codehilite .ne { color: #D2413A; font-weight: bold; } /* Name.Exception */
.codehilite .nf { color: #795da3; } /* Name.Function */
.codehilite .nl { color: #A0A000; } /* Name.Label */
.codehilite .nn { color: #795da3; font-weight: bold; } /* Name.Namespace */
.codehilite .nt { color: #008000; font-weight: bold; } /* Name.Tag */
.codehilite .nv { color: #19177C; } /* Name.Variable */
.codehilite .nx { color: #444; } /* Not sure? */
.codehilite .ow { color: #AA22FF; font-weight: bold; } /* Operator.Word */
.codehilite .w { color: #bbbbbb; } /* Text.Whitespace */
.codehilite .mf { color: #0086b3; } /* Literal.Number.Float */
.codehilite .mh { color: #0086b3; } /* Literal.Number.Hex */
.codehilite .mi { color: #0086b3; } /* Literal.Number.Integer */
.codehilite .mo { color: #0086b3; } /* Literal.Number.Oct */
.codehilite .sb { color: #6ea22c; } /* Literal.String.Backtick */
.codehilite .sc { color: #6ea22c; } /* Literal.String.Char */
.codehilite .sd { color: #6ea22c; font-style: italic; } /* Literal.String.Doc */
.codehilite .s2 { color: #183691; } /* Literal.String.Double */
.codehilite .se { color: #BB6622; font-weight: bold; } /* Literal.String.Escape */
.codehilite .sh { color: #6ea22c; } /* Literal.String.Heredoc */
.codehilite .si { color: #BB6688; font-weight: bold; } /* Literal.String.Interpol */
.codehilite .sx { color: #008000; } /* Literal.String.Other */
.codehilite .sr { color: #3aaec3; } /* Literal.String.Regex */
.codehilite .s1 { color: #6ea22c; } /* Literal.String.Single */
.codehilite .ss { color: #19177C; } /* Literal.String.Symbol */
.codehilite .bp { color: #008000; } /* Name.Builtin.Pseudo */
.codehilite .vc { color: #19177C; } /* Name.Variable.Class */
.codehilite .vg { color: #19177C; } /* Name.Variable.Global */
.codehilite .vi { color: #19177C; } /* Name.Variable.Instance */
.codehilite .il { color: #666666; } /* Literal.Number.Integer.Long */

View File

@ -367,8 +367,7 @@ class CssDeclaration(object):
res += self.css_property
res += ':'
res += self.css_value.text()
if self.semicolon:
res += ';'
res += ';'
res += self.post_fluff
return res

View File

@ -62,9 +62,13 @@ class ParserTestHappyPath(unittest.TestCase):
p { color: red }
'''
reformatted_css = '''
p { color: red ;}
'''
res = parse(my_css)
self.assertEqual(res.text(), my_css)
self.assertEqual(res.text(), reformatted_css)
section = cast(CssSection, res.sections[0])