-
Notifications
You must be signed in to change notification settings - Fork 400
Add-on with long name is causing layout issues #2465
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
Conversation
3a8cecd
to
3b6089c
Compare
src/core/css/SearchResult.scss
Outdated
margin: 0; | ||
padding: 0; | ||
text-decoration: none; | ||
width: calc(100% - 40px); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To aid us in the future can you add comments for what the calc is based on in both cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For addon listing
Calc(100% - 40px) - 38 px is fixed width .SearchResult-icon
hence (100%-40px) for .SearchResult-heading
For theme listing
Calc(100% - 85px) - 85 px is fixed width .SearchResult-rating
hence (100%-85px) for .SearchResult-heading
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tsl143 thanks, could you add those details to the CSS as comments please.
@tsl143 thanks for the patch. Please can you add before and after screenshots to the pr? |
@muffinresearch Screenshots FOR ADDONS LISTINGFOR THEMES LISTING |
Is there a way to do this with flexbox instead of all the floats and calc? I appreciate the floats were there before but I think this might be cleaner with flexbox directly. |
There could do with being more whitespace between the text + ratings, so I'd allow for at least 10px gutter between them so things don't look too cramped. |
We can for sure use flexbox (always like them ) |
Yep that should be fine. |
@tsl143 hi, hope you had a good vacation. Let me know if you have any updates to review. |
Thanks, yes indeed I had a really good one :) |
@tsl143 you can configure the api host with a local config see https://github.com/mozilla/addons-frontend#configuring-for-local-development for details. This example should work for -dev: // config/local-development.js
module.exports = {
apiHost: 'https://addons-dev.allizom.org',
amoCDN: 'https://addons-dev-cdn.allizom.org',
}; |
This is what I was looking for, thanks :) |
@tsl143 feel free to just update this PR. |
src/core/css/SearchResult.scss
Outdated
width: 38px; | ||
|
||
[dir=rtl] & { | ||
margin: 0 5px 0 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a mixin for this in core/css/inc/mixins
: @include margin-start(5px);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(It would go in the main selector though, where margin-left
is.
src/core/css/SearchResult.scss
Outdated
font-size: $font-size-default; | ||
font-weight: bold; | ||
margin: 0; | ||
min-width: 1%; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The flex-item is overflowing so to control that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @tofumatt , @muffinresearch |
The issue has already been fixed by layout change, hence closing |
FIX mozilla/addons#10391