Closed (fixed)
Project:
Drupal core
Version:
8.9.x-dev
Component:
Claro theme
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
29 Nov 2019 at 15:42 UTC
Updated:
8 Jun 2020 at 10:59 UTC
Jump to comment: Most recent, Most recent file



Comments
Comment #2
ckrinaAdding Figma specs link.
Comment #3
ckrinaComment #4
lauriiiComment #5
reinchekI've applyed the css spacer modification.
.
Comment #6
reinchekComment #7
lauriiiI'm not sure if we can just change the margin of the content header because of the margin specified in the content header is still 2rem. I assume the margin should be 1rem only when there are tabs.
Comment #8
reinchekI'm not sure too... but actually claro doesn't discriminate the margin when there're and there aren't the tabs. The only way to change the tabs space (margin) is to reduce .content-header margin-bottom rule.
I will wait for explainations ...
have a nice day. :)
Comment #9
lauriiiAgreed that it's not clear. I asked for clarification from @ckrina who is one of the designers and the author of this issue.
Comment #10
ckrinaYes, I confirm this space should be smaller when there are secondary tabs because their internal padding leaves enough top visual space.
I'd say if you want to change this bottom margin as a general rule you should then either:
Although the first option might have too many open options.
Comment #11
reinchek@ckrina maybe this could be a nice solution.
I've added a little piece of js code inside the nav-tabs.js library that add the ".with-secondary-tabs" class to the only when really there are the secondary tabs.
Attached the screenshots that show the behaviors.


The code that add the discriminant class is:
Comment #12
reinchekComment #13
vinodhini.e commented#11, I have reviewed the patch and its working for me. I am attaching the screenshot after applying the patch.
Comment #14
naresh_bavaskar+1 RTBC


#11 Patch works for me.
Comment #15
naresh_bavaskarComment #16
lauriiiI'm not sure if we need JavaScript to get this done given that this isn't really interactive. Let's try to come up with a CSS only solution for this.
Comment #17
reinchekI've tried, before the js solution, to handle the issue with pure css solution. But as you can see i've failed!
The other thing that conviced me to adopt a js solution it was the fact that in another place (if i remember right) also was used to resolve a similar issue.
(ps: happy new year)
Comment #18
sibustephen commentedHi, have attached a screenshot where the space seems to be good, when we reduce it to 1rem, have raise a patch for the same, do review.
Comment #19
kishor_kolekar commentedComment #20
kishor_kolekar commentedI have created a patch. Below points are implemented in this patch:
Kindly review the patch and screenshot attached.
Comment #21
kishor_kolekar commentedComment #22
kishor_kolekar commentedAdding interdiff for the patch in comment #20.
Comment #23
sibustephen commented@kishor_kolekar can you reroll my patch #18 and then add your code for fix with interdiff, in order to track the changes.
Comment #24
sibustephen commentedComment #25
ravi.shankar commentedHere I have re-rolled patch #18
Made changes those done in patch #20 and added interdiff.
Comment #26
lauriiiUnfortunately, this approach doesn't match with the style guide. See #2.
Comment #27
sibustephen commentedComment #28
kishor_kolekar commentedpreviously added the code in incorrect file , so added the code in correct file and created the patch with the interdiff
Comment #29
naresh_bavaskarComment #30
naresh_bavaskar#28 applied successfully. The secondary tab size is looking good to me.
Comment #31
lauriiiUnfortunately, we can't simply just change the margin of the content header because of the margin specified in the content header is still 2rem. The margin should be 1rem only when there are tabs.
Comment #32
kishor_kolekar commentedhere is the simple css solution .
kindly review my patch
Comment #33
akashkumar07 commentedComment #34
szalapski.adam@gmail.com commentedComment #35
jordanwood commentedPatch from #34 applied cleanly and matches the proposed resolution.
Comment #36
hotwebmatter commentedThis looks good, passes tests and meets specification. RTBC+1
Comment #37
krzysztof domańskiThanks all for working on Claro theme!
1. @Adam Szałapski At the DGCW, I mentioned that drupal does not use compilers to generate css files. I was wrong.
Since Drupal 8.8.x we're using PostCSS for compiling creating CSS so we also need to change
*.pcss.cssfiles. See Drupal core using PostCSS for development.2. Margin when there are no secondary tabs. It is a bit problematic.
@lauriii Let's add 2rem space to
.page-content. Then we can use a 1rem space to.content-header. What do you think about it?Comment #38
szalapski.adam@gmail.com commentedThanks, Krzysztof Domański for valuable information about PostCSS configuration and few tips to fix spacing issues. Please review my newest patch.
Comment #39
krzysztof domańskiTested manually. Looks good to me.
Comment #40
lauriiiThe current patch increases margin on the bottom of the tabs on mobile. Is this intentional?
Comment #41
KondratievaS commentedSpacing between tabs is OK
Comment #42
ckrinaHi @KondratievaS, as @lauriii is pointing, the spacing was smaller on mobile/small devices where we have less space. And as per designs, it should still be smaller:
https://www.figma.com/file/OqWgzAluHtsOd5uwm1lubFeH/Drupal-Design-system...
The reason behind this is because in smaller devices we have less space, so we need to leave less spacing.
Thanks for working on this!
Comment #43
KondratievaS commentedComment #44
krzysztof domański1. Spaces on mobile have been changed according to the Drupal Design system.
2. Also the space above the "Add content" button is still the same.
Comment #45
krzysztof domańskiOh right, it needs work.
Comment #46
kostyashupenkoComment #47
kostyashupenkoComment #48
KondratievaS commentedTested patch from #47 and result is OK
Comment #49
KondratievaS commentedComment #50
lauriiiThank you all for working on this! This is great progress.
It seems like this should be 1.5rem in mobile.
Comment #51
neslee canil pintoComment #52
lauriiiThank you! We shouldn't remove the 2rem completely because it is the correct value for desktop. We should use media query for allowing this property to take effect on large viewports.
Comment #53
neslee canil pintoComment #54
KondratievaS commentedTested patch from #53 and result is OK
Comment #55
KondratievaS commentedComment #56
lauriiiLet's regenerate the layout.css 😇
We have generally preferred usage of min-width selectors on media queries.
Comment #57
sauravk commentedComment #58
sauravk commentedComment #59
sauravk commentedComment #60
shaktikit looks good to me.
Comment #61
bhumikavarshney commentedHi,
The #59 patch is working for me.
Comment #62
lauriiiThere's a regression on the secondary tabs focus effect:

Comment #63
sauravk commentedComment #64
sauravk commentedFixed secondary tabs focus effect.
Comment #65
KondratievaS commentedTested patch from #64 in Chrome, FF, Safari, IE for mobile and desktop resolutions and result is OK
Comment #66
KondratievaS commentedComment #68
xjmComment #69
lauriiiDiscussed with @ckrina about the secondary tabs designs and it seems like there are at least a couple of things that were clarified in the designs that need to be addressed here too:
Comment #70
sauravk commentedComment #71
sauravk commentedComment #72
nitesh624patch https://www.drupal.org/files/issues/2020-05-07/3097651-71.patch fixes the css problem see the below screenshot

Comment #73
atul4drupal commented#71 Looks good,addresses concerns from #69.
Comment #74
lauriiiThis looks great! We're currently on a code freeze but I will get back to this once the freeze is over.
Comment #78
lauriiiI had to run
yarn run lint:css --fixandyarn run build:css. Interdiff attached here.Committed 2d166ac and pushed to 9.1.x, 9.0.x and 8.9.x. Thanks!
Comment #79
lauriiiHere's the missing interdiff