Commit e5742cf4 authored by iliia@google.com's avatar iliia@google.com

DevTools: [Documentation] fix css styles for renderer

BUG=391593

Review URL: https://codereview.chromium.org/548213004

git-svn-id: svn://svn.chromium.org/blink/trunk@181620 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 31517ee8
......@@ -168,9 +168,11 @@ WebInspector.DocumentationView.Renderer.prototype = {
var name = header.createChild("span", "documentation-parameter-name");
name.textContent = parameters[i].name;
var dataTypeValue = header.createChild("span", "documentation-parameter-data-type-value");
dataTypeValue.classList.add("documentation-box");
dataTypeValue.textContent = parameters[i].dataType;
if (parameters[i].optional) {
var optional = header.createChild("span", "documentation-parameter-optional");
optional.classList.add("documentation-box");
optional.textContent = WebInspector.UIString("Optional");
}
parameter.appendChild(this._renderBlock(parameters[i].description));
......@@ -211,11 +213,12 @@ WebInspector.DocumentationView.Renderer.prototype = {
var exampleDescription = example.createChild("div", "documentation-example-description-section");
if (examples[i].liveUrl) {
var liveUrl = exampleDescription.createChild("a", "documentation-example-link");
liveUrl.classList.add("documentation-box");
liveUrl.href = examples[i].liveUrl;
liveUrl.textContent = WebInspector.UIString("Example");
}
exampleDescription.appendChild(this._renderBlock(examples[i].description));
var code = example.createChild("div", "documentation-example-code");
var code = example.createChild("div", "documentation-code");
code.classList.add("source-code");
code.textContent = examples[i].code;
if (!examples[i].language)
......
......@@ -4,13 +4,6 @@
* found in the LICENSE file.
*/
.documentation-example-code {
border: 1px dotted black;
border-radius: 6px;
padding: 10px;
margin-bottom: 10px;
}
.documentation-code {
border: 1px dotted black;
border-radius: 6px;
......@@ -45,22 +38,11 @@
}
.documentation-parameter-optional {
padding: 6px;
background-color: rgb(219, 234, 249);
text-decoration: none;
margin-left: 10px;
margin-top: -5px;
border-radius: 5px;
}
.documentation-parameter-data-type-value {
margin-right: 5px;
padding: 6px;
background-color: rgb(254, 254, 202);
text-decoration: none;
margin-left: 10px;
margin-top: 5px;
border-radius: 5px;
}
.documentation-parameter-name {
......@@ -85,8 +67,10 @@
.documentation-example-link {
float: right;
}
.documentation-box {
padding: 6px;
background-color: rgb(241, 246, 251);
text-decoration: none;
margin-left: 10px;
margin-top: 5px;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment