Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize method style #38

Merged
merged 3 commits into from
Apr 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@api-components/api-method-documentation",
"description": "A HTTP method documentation build from AMF model",
"version": "5.2.0",
"version": "5.2.1",
"license": "Apache-2.0",
"main": "index.js",
"module": "index.js",
Expand Down
39 changes: 27 additions & 12 deletions src/Styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,21 @@ export default css`
}

.heading2 {
font-size: var(--arc-font-title-font-size);
font-weight: var(--arc-font-title-font-weight);
line-height: var(--arc-font-title-line-height);
color: var(--arc-font-title-color);
font-family: var(--api-method-documentation-h2-font-family, var(--arc-font-title-font-family));
font-size: var(--api-method-documentation-h2-font-size, var(--arc-font-title-font-size));
font-weight: var(--api-method-documentation-h2-font-weight, var(--arc-font-title-font-weight));
line-height: var(--api-method-documentation-h2-line-height, var(--arc-font-title-line-height));
color: var(--api-method-documentation-h2-font-color, var(--arc-font-title-color));
margin: 0.84em 0;
}

.heading3 {
flex: 1;
font-size: var(--arc-font-subhead-font-size);
font-weight: var(--arc-font-subhead-font-weight);
line-height: var(--arc-font-subhead-line-height);
color: var(--arc-font-subhead-color);
font-family: var(--api-method-documentation-h3-font-family, var(--arc-font-subhead-font-family));
font-size: var(--api-method-documentation-h3-font-size, var(--arc-font-subhead-font-size));
font-weight: var(--api-method-documentation-h3-font-weight, var(--arc-font-subhead-font-weight));
line-height: var(--api-method-documentation-h3-line-height, var(--arc-font-subhead-line-height));
color: var(--api-method-documentation-h3-font-color, var(--arc-font-subhead-color));
}

.heading4 {
Expand Down Expand Up @@ -76,13 +78,22 @@ export default css`
display: flex;
flex-direction: row;
align-items: center;
font-family: var(--arc-font-code-family);
font-family: var(
--api-method-documentation-url-font-family,
var(--arc-font-code-family)
);
font-size: var(--api-method-documentation-url-font-size, 1.07rem);
font-weight: var(--api-method-documentation-url-font-weight);
line-height: var(--api-method-documentation-url-line-height);
margin-bottom: 40px;
margin-top: 20px;
background-color: var(--code-background-color);
color: var(--code-color);
padding: 8px;
margin: var(--api-method-documentation-url-margin);
background-color: var(--api-method-documentation-url-background-color, var(--code-background-color));
color: var(
--api-method-documentation-url-font-color,
var(--code-color)
);
padding: var(--api-method-documentation-url-padding, 8px);
border-radius: var(--api-method-documentation-url-border-radius, 4px);
position: relative;
}
Expand All @@ -92,6 +103,7 @@ export default css`
flex-direction: row;
align-items: center;
border-bottom: 1px var(--api-parameters-document-title-border-color, #e5e5e5) solid;
border: var(--api-parameters-document-title-border);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@twoplustwoone, @jarrodek, this property overrides border-bottom above and breaks current styling. Please re-review and fix. The same problem here:
advanced-rest-client/api-body-document@ded3611#diff-eccc2b8fef024888c50f0586687e68415115c3cc38bd9fda26ba1d4cbd0ce0dcR20
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deiteris Thanks for finding this

I've opened the following pull changes to address these issues

cursor: pointer;
user-select: none;
transition: border-bottom-color 0.15s ease-in-out;
Expand All @@ -104,6 +116,7 @@ export default css`
.url-value {
flex: 1;
margin-left: 12px;
margin: var(--api-method-documentation-url-value-margin);
word-break: break-all;
}

Expand Down Expand Up @@ -166,6 +179,8 @@ arc-marked {
.method-label {
margin-bottom: 0;
font-size: var(--api-method-documentation-http-method-label-font-size, inherit);
font-family: var(--api-method-documentation-http-method-label-font-family);
font-weight: var(--api-method-documentation-http-method-label-font-weight);
min-width: var(--api-method-documentation-http-method-label-min-width, inherit);
}

Expand Down