Skip to content

flex+grid#12

Open
VKNS wants to merge 3 commits into
epam-js-jun-2019:masterfrom
VKNS:master
Open

flex+grid#12
VKNS wants to merge 3 commits into
epam-js-jun-2019:masterfrom
VKNS:master

Conversation

@VKNS
Copy link
Copy Markdown

@VKNS VKNS commented Jul 13, 2019

No description provided.

Copy link
Copy Markdown

@svvald svvald left a comment

Choose a reason for hiding this comment

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

Decent work in general, but there are some points that could be improved.
Widget displays correctly in all browsers but I have outlined some minor issues when it is placed in column:
изображение

Also it would be great if it will be stretched to fullscreen.

Comment thread Nikita Korzhavin/flex/index.html Outdated
<article class="widget">

<div class="widget__card card card_bg-color_06b3db">
<div class="card__img card__img_size_l card__img_opacity">
Copy link
Copy Markdown

@svvald svvald Jul 23, 2019

Choose a reason for hiding this comment

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

Actually I don't understand which CSS methodology you are trying to use. You name classes like in BEM but concatenate them together like in OOCSS which make the class property verbose.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I tried to use bem.
Can you give an example how this block of code should be named correctly (in bem)?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Also in your widget picture i see that font didn't load. (on my pc it loaded)
How can i make it work on yours? (Remembering that this font can be loaded only through css file)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'd name it something like widget__card_lightblue and widget__card-img_large_opaque. Yes, it seems quite long but it is correct according to BEM. Note that there are several modifications of BEM specification but the general idea stays the same.

I don't insist on renaming everything here it's just an advice for you to understand principles of different CSS methodologies.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

As for fonts it seems the problem that font source doesn't have valid SSL certificate so my browser couldn't access it.
изображение

It is better to use some trusted and well-known host e.g. Google Fonts

Also that's why I recommended to use fallback fonts in the previous task :)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I'd name it something like widget__card_lightblue and widget__card-img_large_opaque. Yes, it seems quite long but it is correct according to BEM. Note that there are several modifications of BEM specification but the general idea stays the same.

I don't insist on renaming everything here it's just an advice for you to understand principles of different CSS methodologies.

I finally understood where problem lies! I thought that card is block which is situated in another block (widget)!
So this is my mistake ) Thanks

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

As for fonts it seems the problem that font source doesn't have valid SSL certificate so my browser couldn't access it.
изображение

It is better to use some trusted and well-known host e.g. Google Fonts

Also that's why I recommended to use fallback fonts in the previous task :)

Ok.
In this part of hw i added fallback, so we are good here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

edited css names (new commit)

Comment thread Nikita Korzhavin/flex/index.html Outdated

<div class="widget__card card card_bg-color_6139f6">
<div class="card__img card__img_size_l card__img_opacity">
<img src="./images/cloud-sun.svg" alt="CS" />
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CS is not very meaningful alt for the image. Remember that user should be able to understand it if the picture won't load.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed (in commit)

Comment thread Nikita Korzhavin/flex/cubes.css Outdated
min-width: 25px;
}

.card__img_opacity {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'd call it opaque since modifier name is rather adjective than noun.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread Nikita Korzhavin/flex/cubes.css Outdated
justify-content: flex-end;
}

.card_bg-color_06b3db {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

These classnames are meaningless. You'd better to name them somehing like .card_bg-lightblue.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread Nikita Korzhavin/flex/cubes.css Outdated
@media (min-width: 992px) {
.bg1 {
background: url('./images/bg_1.png') no-repeat;
height: 600px;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why do you use fixed height and width for instead of stretching everyting to fullscreen? It is crucial in terms of responsiveness.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

To say the truth I thought that that background isn't necessary part of the widget and so i didnt't pay much attention to its look
so i' ll fix that

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants