-
-
Notifications
You must be signed in to change notification settings - Fork 125
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
standalone bundle - styling issue - font #530
Comments
@thim81 Hi! To <style>
html{-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}
</style> In most cases, people use the component in larger applications, not in a single page, so they give the fonts themselves from global css. |
@magicmatatjahu I added something similar as work-around, but I wasn't sure if that was expected behaviour, but now I do :-) Thanks for clarifying. The font-family and html/body margins/lineheights are the only CSS differences, that are left out? |
@thim81 We exactly used that file https://meyerweb.com/eric/tools/css/reset/ so you can check what exactly we "removed" + of course global font-family :) I think that we should clarify that in the docs, do you wanna create PR with that? :) |
I ll create PR to document this. Shall I add on the main readme or do you prefer that I put it on a dedicated page for the standalone bundle? |
Please add in the Readme in the section when we describe styling https://github.com/asyncapi/asyncapi-react/tree/next#styles Remember about contribution to the |
@magicmatatjahu I also applied a "hack" CSS to inject a logo placeholder, is this something you think is valuable to include in the "styling" section? Example: <style>
div.sidebar::before {
background-color:#00b8fb;
background-image: url(./logo.png');
background-size: cover;
background-position: center;
display: inline-block;
width: 17rem;
height: 11rem;
content:"";
}
</style> Resulting in something like this: (I'm not CSS expert so if you have suggestions to handle this more gracefully, feel free to share) |
@thim81 Custom logo we supported by custom extension in the InfoObject (by {
"asyncapi": "2.2.0",
"info": {
"title": "Account Service",
"version": "1.0.0",
"description": "This service is in charge of processing user signups",
"x-logo": "https://raw.githubusercontent.com/asyncapi/spec/master/assets/logo.png"
},
"channels": {
"user/signedup": {
"subscribe": {
"message": {
"$ref": "#/components/messages/UserSignedUp"
}
}
}
},
"components": {
"messages": {
"UserSignedUp": {
"payload": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "Name of the user"
},
"email": {
"type": "string",
"format": "email",
"description": "Email of the user"
}
}
}
}
}
}
}; and you don't need to inject logo by css :) |
@thim81 If you want, you can document also that extension :) |
@magicmatatjahu The PR is created, looking forward for receiving feedback. |
@magicmatatjahu Should I also create a PR for |
I don't think so. Of course people can use extensions in their specs, but problem is that atm we don't clarify the "shape" of the extension, I mean some JSON Schema to describe that extensions (like here https://github.com/asyncapi/extensions-catalog#twitter). That repo defined |
Going to close the issue, since the PR is being reviewed and you provided all the info to style my AsyncAPI document. Thanks 🙏 |
Description
When using the latest standalone bundle (
[email protected]
) in a HTML page, it seems that something is missing in the styling of the page.Expected result
Actual result
The font styling seems off.
Steps to reproduce
You can use the HTML below to reproduce the styling issue
I'm using a standalone HTML implementation
The text was updated successfully, but these errors were encountered: