Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: pkg/analysis_server/tool/spec/to_html.dart

Issue 461283002: Improve spec style and minor changes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/tool/spec/spec_input.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/tool/spec/to_html.dart
diff --git a/pkg/analysis_server/tool/spec/to_html.dart b/pkg/analysis_server/tool/spec/to_html.dart
index a1d53222c64e0b6a82cf120ad11b486e92eb71ee..01bf15fea1a73f99122f535051dfa9355d9cf0be 100644
--- a/pkg/analysis_server/tool/spec/to_html.dart
+++ b/pkg/analysis_server/tool/spec/to_html.dart
@@ -23,9 +23,17 @@ import 'html_tools.dart';
* Embedded stylesheet
*/
final String stylesheet = '''
+body {
+ font-family: sans-serif, serif;
+ padding-left: 5%;
+ padding-right: 5%;
+}
h1 {
text-align: center;
}
+h2.domain {
+ border-bottom: 3px solid rgb(160, 160, 160);
+}
pre {
margin: 0px;
}
@@ -34,13 +42,25 @@ div.box {
background-color: rgb(207, 226, 243);
padding: 0.5em;
}
+div.hangingIndent {
+ padding-left: 3em;
+ text-indent: -3em;
+}
dt {
margin-top: 1em;
margin-bottom: 1em;
}
-div.hangingIndent {
- padding-left: 3em;
- text-indent: -3em;
+dt.notification {
+ font-weight: bold;
+}
+dt.refactoring {
+ font-weight: bold;
+}
+dt.request {
+ font-weight: bold;
+}
+dt.typeDefinition {
+ font-weight: bold;
}
'''.trim();
@@ -77,7 +97,14 @@ abstract class HtmlMixin {
'style': 'color:#999999'
}, callback);
void h1(void callback()) => element('h1', {}, callback);
- void h2(void callback()) => element('h2', {}, callback);
+ void h2(String cls, void callback()) {
+ if (cls == null) {
+ return element('h2', {}, callback);
+ }
+ return element('h2', {
+ 'class': cls
+ }, callback);
+ }
void h3(void callback()) => element('h3', {}, callback);
void h4(void callback()) => element('h4', {}, callback);
void hangingIndent(void callback()) => element('div', {
@@ -270,7 +297,7 @@ class ToHtmlVisitor extends HierarchicalApiVisitor with HtmlMixin, HtmlGenerator
@override
void visitDomain(Domain domain) {
- h2(() {
+ h2('domain', () {
anchor('domain_${domain.name}', () {
write('Domain: ${domain.name}');
});
« no previous file with comments | « pkg/analysis_server/tool/spec/spec_input.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698