Skip to content

Commit 7612aee

Browse files
committed
Merge pull request #47 from caxy/enhancement/demo-styles
Cleanup CSS and add styles for highlighting differences (#45)
2 parents 6c6d52a + dcaf48c commit 7612aee

File tree

1 file changed

+53
-206
lines changed

1 file changed

+53
-206
lines changed

demo/codes.css

Lines changed: 53 additions & 206 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Difference Highlighting and Strike-through
2+
------------------------------------------------ */
3+
ins {
4+
color: #333333;
5+
background-color: #eaffea;
6+
text-decoration: none;
7+
}
8+
del {
9+
color: #AA3333;
10+
background-color: #ffeaea;
11+
text-decoration: line-through;
12+
}
13+
14+
/* Image Diffing
15+
------------------------------------------------ */
116
del.diffimg.diffsrc {
217
display: inline-block;
318
position: relative;
@@ -25,14 +40,43 @@ del.diffimg.diffsrc:before {
2540
);
2641
}
2742

43+
/* List Diffing
44+
------------------------------------------------ */
45+
/* List Styles */
46+
.diff-list {
47+
list-style: none;
48+
counter-reset: section;
49+
display: table;
50+
}
51+
2852
.diff-list > li.normal,
2953
.diff-list > li.removed,
30-
.diff-list > li.replacement{
54+
.diff-list > li.replacement {
3155
display: table-row;
3256
}
57+
58+
.diff-list > li > div{
59+
display: inline;
60+
}
61+
62+
.diff-list > li.replacement:before,
63+
.diff-list > li.new:before {
64+
color: #333333;
65+
background-color: #eaffea;
66+
text-decoration: none;
67+
}
68+
69+
.diff-list > li.removed:before{
70+
counter-increment: section;
71+
color: #AA3333;
72+
background-color: #ffeaea;
73+
text-decoration: line-through;
74+
}
75+
76+
/* List Counters / Numbering */
3377
.diff-list > li.normal:before,
3478
.diff-list > li.removed:before,
35-
.diff-list > li.replacement:before{
79+
.diff-list > li.replacement:before {
3680
width: 15px;
3781
overflow: hidden;
3882
content: counters(section,".") ". ";
@@ -41,22 +85,11 @@ del.diffimg.diffsrc:before {
4185
padding-left: 1em;
4286
}
4387

44-
/* overwrite width of :before on ballot pages */
45-
.ballot-monograph .diff-list > li.normal:before,
46-
.ballot-monograph .diff-list > li.removed:before,
47-
.ballot-monograph .diff-list > li.replacement:before {
48-
width: 30px;
49-
}
50-
5188
.diff-list > li.normal:before,
5289
li.replacement + li.replacement:before,
5390
.diff-list > li.replacement:first-child:before{
5491
counter-increment: section;
5592
}
56-
.diff-list > li.removed:before{
57-
counter-increment: section;
58-
text-decoration: line-through;
59-
}
6093
ol.diff-list li.removed + li.replacement {
6194
counter-increment: none;
6295
}
@@ -93,205 +126,19 @@ ol.diff-list li.removed + li.removed + li.removed + li.removed + li.removed + li
93126
ol.diff-list li.removed + li.removed + li.removed + li.removed + li.removed + li.removed + li.removed + li.removed + li.removed + li.removed + li.removed + li.removed + li.replacement {
94127
counter-increment: section -11;
95128
}
96-
.diff-list > li.replacement:before,
97-
.diff-list > li.new:before{
98-
text-decoration: underline;
99-
}
100-
.diff-list > li > div{
101-
display: inline;
102-
}
103-
.diff-list{
104-
list-style: none;
105-
counter-reset: section;
106-
display: table;
107-
}
108-
.sectionContent ol,
109-
.revision-container ol{
110-
list-style: none;
111-
counter-reset: section;
112-
}
113-
.sectionContent ol li,
114-
.revision-container ol li{
115-
position: relative;
116-
padding: 0 0 0 30px;
117-
color: #000000;
118-
text-indent: 0px;
119-
}
120-
.sectionContent ol ol li,
121-
.revision-container ol ol li{
122-
padding: 0 0 0 45px;
123-
}
124-
.sectionContent ol ol ol li,
125-
.revision-container ol ol ol li{
126-
padding: 0 0 0 60px;
127-
}
128-
.sectionContent ol ol ol ol li,
129-
.revision-container ol ol ol ol li{
130-
padding: 0 0 0 75px;
131-
}
132-
.sectionContent ol ol ol ol ol li,
133-
.revision-container ol ol ol ol ol li{
134-
padding: 0 0 0 90px;
135-
}
136-
.sectionContent ol ol ol ol ol ol li,
137-
.revision-container ol ol ol ol ol ol li{
138-
padding: 0 0 0 105px;
139-
}
140-
.sectionContent ol ol ol ol ol ol ol li,
141-
.revision-container ol ol ol ol ol ol ol li{
142-
padding: 0 0 0 120px;
143-
}
144-
.sectionContent ol ol ol ol ol ol ol ol li,
145-
.revision-container ol ol ol ol ol ol ol ol li{
146-
padding: 0 0 0 135px;
147-
}
148-
.sectionContent ol ol ol ol ol ol ol ol ol li,
149-
.revision-container ol ol ol ol ol ol ol ol ol li{
150-
padding: 0 0 0 160px;
151-
}
152-
.sectionContent ol ol ol ol ol ol ol ol ol ol li,
153-
.revision-container ol ol ol ol ol ol ol ol ol ol li{
154-
padding: 0 0 0 175px;
155-
}
156-
.sectionContent ol li:before,
157-
.revision-container ol li:before{
158-
counter-increment: section;
159-
content:counters(section, ".") ".";
160-
position: absolute;
161-
left: 0px;
162-
}
163-
li.italic {
164-
font-style: italic;
165-
}
166-
167-
.sectionTitle {
168-
text-align: center;
169-
margin: 23px 0 15px;
170-
}
171-
172-
.precontent-title {
173-
margin-bottom: 10px;
174-
display: block;
175-
}
176-
177-
.secondParagraph {
178-
text-indent: 1em;
179-
}
180-
181-
.indentedParagraph {
182-
margin-left: 1em;
183-
}
184-
185-
.outdentOneLevel {
186-
margin-left: -75px;
187-
}
188-
189-
ol.list-alpha-upper > li:before {
190-
content: counter(section, upper-alpha) ".";
191-
}
192-
193-
ol.list-alpha-lower > li:before {
194-
content: counter(section, lower-alpha) ".";
195-
}
196-
197-
ol.list-roman-upper > li:before {
198-
content: counter(section, upper-roman) ".";
199-
}
200-
201-
ol.list-roman-lower > li:before {
202-
content: counter(section, lower-roman) ".";
203-
}
204-
205-
ol.list-roman-lower-parentheses > li:before {
206-
content: "(" counter(section, lower-roman) ")";
207-
}
208-
209-
ol.list-alpha-lower-parentheses > li:before {
210-
content: "(" counter(section, lower-alpha) ")";
211-
}
212-
213-
ol.list-numeric-right-parenthesis > li:before {
214-
content: counter(section) ")";
215-
}
216129

217-
.revision-content,
218-
.revision-content p,
219-
.revision-content ol,
220-
.revision-content ul,
221-
.revision-content li,
222-
.revision-content td,
223-
.sectionContent,
224-
.sectionContent p,
225-
.sectionContent ol,
226-
.sectionContent ul,
227-
.sectionContent li,
228-
.sectionContent td,
229-
.revision-notes {
230-
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif !important;
231-
font-size: 14px !important;
232-
font-weight: normal !important;
233-
line-height: 18px !important;
234-
color:#404040 !important;
235-
}
236-
237-
.revision-content .footnotes p,
238-
.revision-content .footnotes ol,
239-
.revision-content .footnotes ul,
240-
.revision-content .footnotes li,
241-
.revision-content .footnotes td,
242-
.sectionContent .footnotes p,
243-
.sectionContent .footnotes ol,
244-
.sectionContent .footnotes ul,
245-
.sectionContent .footnotes li,
246-
.sectionContent .footnotes td {
247-
font-size: 12px !important;
248-
}
249-
.diff-list ul.exception ol ,
250-
.sectionContent ul.exception ol ,
251-
.revision-container ul.exception ol{
252-
list-style: none;
253-
counter-reset: exception-section;
254-
/* Creates a new instance of the section counter with each ol element */
255-
}
130+
/* Exception Lists */
256131
ul.exception,
257132
ul.exception li:before {
258133
list-style: none;
259134
content: none;
260135
}
261-
.diff-list ul.exception ol > li:before,
262-
.sectionContent ul.exception ol > li:before,
263-
.revision-container ul.exception ol > li:before {
136+
.diff-list ul.exception ol {
137+
list-style: none;
138+
counter-reset: exception-section;
139+
/* Creates a new instance of the section counter with each ol element */
140+
}
141+
.diff-list ul.exception ol > li:before {
264142
counter-increment: exception-section;
265143
content:counters(exception-section, ".") ".";
266144
}
267-
.sectionContent i > sub,
268-
.revision-container i > sub {
269-
font-style: italic;
270-
}
271-
div.print-section a {
272-
text-align: center;
273-
color: #818181;
274-
display: block;
275-
text-decoration: none;
276-
font-size: 0.8em;
277-
}
278-
div.print-section a.disabled {
279-
display: none;
280-
}
281-
282-
.print-link {
283-
color: #818181;
284-
}
285-
.print-link.disabled {
286-
cursor: text;
287-
text-decoration: none;
288-
}
289-
290-
/* Hack for generic styles that shouldn't exist in the database */
291-
.content_bold {
292-
font-weight: bold;
293-
}
294-
295-
.content_italics {
296-
font-style: italic;
297-
}

0 commit comments

Comments
 (0)