Skip to content

Commit 61922c6

Browse files
committed
Use more CSS on the elements themselves, and avoid applyAuthorStyles.
1 parent 79527ec commit 61922c6

File tree

1 file changed

+24
-48
lines changed

1 file changed

+24
-48
lines changed

grammar.html

Lines changed: 24 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -8,85 +8,61 @@
88
version of the draft standard (or as well as I can interpret
99
the spacing in LaTeX - a .9\textwidth minipage with tabs every
1010
.6 inches).
11-
12-
FIXME: We should pobably define a CXX class for these blocks.
1311
-->
14-
<polymer-element name="bnf-grammar">
12+
<polymer-element name="bnf-grammar" noscript>
1513
<template>
16-
<div style="font-style:italic;margin-left:.35in;">
17-
<content></content>
18-
</div>
14+
<style>
15+
:host { display: block; font-style:italic; margin-left:.35in; };
16+
</style>
17+
<content></content>
1918
</template>
20-
<script>
21-
Polymer('bnf-grammar', {
22-
applyAuthorStyles: true,
23-
});
24-
</script>
2519
</polymer-element>
2620

2721
<!-- BNF rule
2822
Defines a BNF production.
2923
-->
30-
<polymer-element name="bnf-rule">
24+
<polymer-element name="bnf-rule" noscript>
3125
<template>
32-
<span style="margin-left:.6in"><content></content>:<br/></span>
26+
<style>
27+
:host { display: block; margin-left: .6in; }
28+
</style>
29+
<content></content>:
3330
</template>
34-
<script>
35-
Polymer('bnf-rule', {
36-
applyAuthorStyles: true,
37-
});
38-
</script>
3931
</polymer-element>
4032

4133

42-
<!-- BNF rule alternative.
43-
Indents the alternative beneath the rule name and applies
34+
<!-- BNF rule alternative.
35+
Indents the alternative beneath the rule name and applies
4436
a line break.
4537
-->
46-
<polymer-element name="bnf-alt">
38+
<polymer-element name="bnf-alt" noscript>
4739
<template>
48-
<span style="margin-left:1.2in"><content></content></span><br/>
40+
<style>
41+
:host { display: block; margin-left:1.2in; }
42+
</style>
43+
<content></content>
4944
</template>
50-
<script>
51-
Polymer('bnf-alt', {
52-
applyAuthorStyles: true,
53-
});
54-
</script>
5545
</polymer-element>
5646

5747
<!-- BNF terminal
5848
A terminal element in a BNF specification.
5949
-->
60-
<polymer-element name="bnf-terminal">
61-
<template
62-
><code style="font-style:normal"><content></content></code></template>
63-
<script>
64-
Polymer('bnf-terminal', {
65-
applyAuthorStyles: true,
66-
});
67-
</script>
50+
<polymer-element name="bnf-terminal" noscript>
51+
<template><style>
52+
:host { font-style: normal; }
53+
</style><code><content></content></code></template>
6854
</polymer-element>
6955

7056
<!-- BNF optional element -->
71-
<polymer-element name="bnf-opt">
57+
<polymer-element name="bnf-opt" noscript>
7258
<template><sub>opt</sub></template>
73-
<script>
74-
Polymer('bnf-opt', {
75-
applyAuthorStyles: true,
76-
});
77-
</script>
7859
</polymer-element>
7960

8061
<!-- Grammar terms
8162
A grammar term refers to a BNF production in the grammar.
8263
83-
TODO: Link grammar terms to their definitions?
64+
TODO: Link grammar terms to their definitions?
8465
-->
85-
<polymer-element name="cxx-grammarterm">
66+
<polymer-element name="cxx-grammarterm" noscript>
8667
<template><i><content></content></i></template>
87-
<script>
88-
Polymer('cxx-grammarterm', {
89-
applyAuthorStyles: true,
90-
});
91-
</script>
9268
</polymer-element>

0 commit comments

Comments
 (0)