Update dynamic theme fixes config for *.iherb.com#15685
Conversation
Need to use more specific selector in order to define text color only on the desired images.
| div[data-qa-element^="rewards-landing-faq-item-collapse"]::after | ||
| div.policy-accordion-item img | ||
| div.cms-accordion-switch-btn | ||
| span.cms-bubble-text |
There was a problem hiding this comment.
Not needed anymore after modifying the CSS rule below.
|
|
||
| CSS | ||
| div.custom-flex-box-item span, | ||
| div:is(.cms-banner-container, .rewards-banner-container) div.custom-flex-box-item span, |
There was a problem hiding this comment.
Use more specific selectors in order to avoid issues elsewhere.
| div.cms-accordion-switch-btn | ||
| div.myaccount-container div[data-an-element="base-info"] > div:first-of-type svg | ||
| div.house-brand-content-container div.section-2-img img:not([alt$="icon"]) | ||
| div#hamburger-menu-base img |
There was a problem hiding this comment.
Icons in the sidepanel of the mobile version.
https://pt.iherb.com/
| div.myaccount-container div[data-an-element="base-info"] > div:first-of-type svg | ||
| div.house-brand-content-container div.section-2-img img:not([alt$="icon"]) | ||
| div#hamburger-menu-base img | ||
| a[class$="SocialIcons"] img |
There was a problem hiding this comment.
Social icons in the footer of the mobile version.
https://pt.iherb.com/
| div.house-brand-content-container div.section-2-img img:not([alt$="icon"]) | ||
| div#hamburger-menu-base img | ||
| a[class$="SocialIcons"] img | ||
| img[src$="/iHerb_Vitacost.png"] |
There was a problem hiding this comment.
iHerb+VITACOST logo at:
https://pt.iherb.com/pressreleases/iherb-acquires-vitacost-business/2280
| a.menu-link.menu-pill-wrapper span, | ||
| div[data-qa-element="SubscribeListContainer"] h4, | ||
| div.quality-description { | ||
| div.slider-container a > div:nth-of-type(2), |
There was a problem hiding this comment.
Note that we are using IGNORE IMAGE ANALYSIS on all elements in the website.
These selectors define black color on text over images that have lighter backgrounds.
These apply to the mobile version of the website.
https://pt.iherb.com/
| div.house-brand-content-container div:is(.section-1, .section-2) { | ||
| background-image: none !important; | ||
| } | ||
| .parent-selector { |
There was a problem hiding this comment.
Lines R792 to R819 fix backgrounds in the mobile and desktop version of the following pages:
https://pt.iherb.com/c/california-gold-nutrition
https://pt.iherb.com/c/cgn-digestive-health
https://pt.iherb.com/c/california-gold-nutrition-pure-sports
The backgrounds are images which are light and the text is also light.
The purpose is for the surrounding images and the text to remain visible.
There was a problem hiding this comment.
Can not find any element with class .parent-selector on mentioned pages.
Can not confirm this part of fix is needed.
There was a problem hiding this comment.
.parent-selectror is not needed.
Will delete the respective lines.
| div[class^="scan-qr-login_qrCode"] svg * | ||
| div.shipping-textbox-subheader span | ||
| div.sc-social-media-list * | ||
| :is(section, div).footer-banner-container * |
There was a problem hiding this comment.
The green rewards area near the bottom.
https://pt.iherb.com/
|
|
||
| CSS | ||
| div.cms-banner-container div.custom-flex-box-item span, | ||
| div.cms-banner-container div.custom-flex-box-item, |
There was a problem hiding this comment.
Text over the images near the top of the mobile version.
https://pt.iherb.com/
| CSS | ||
| div.cms-banner-container div.custom-flex-box-item span, | ||
| div.cms-banner-container div.custom-flex-box-item, | ||
| div.cms-banner-container div.custom-flex-box-item span:not(.custom-button), |
There was a problem hiding this comment.
Exclude text inside the dark green button.
https://pt.iherb.com/
| div[data-qa-element="SubscribeListMobileContainer"] | ||
| > div:first-of-type > div > div > div:first-of-type > h2 > div { | ||
| > div:first-of-type > div > div > div:first-of-type > h2 > div, | ||
| div.professional-brands-intro div.brands-header:not(:has(> div > div > img)) * { |
There was a problem hiding this comment.
Text over the image near the top of the mobile version.
https://pt.iherb.com/c/sports
The purpose of the :not is to exclude the white text over the brands section:
https://pt.iherb.com/
https://pt.iherb.com/c/professional-brands
| div.slider-container div[class$="IconCategories"] img, | ||
| div.slider-container div[class$="BrandsSubNav"] img, | ||
| div.slider-container div[class$="SpecialsCarousel"] img, | ||
| div.slider-container div[class$="CategoriesCarousel"] img, |
There was a problem hiding this comment.
I am thinking about making this fixes little smaller. Maybe you could use
div.slider-container img, which would work for all five entries?
| img.shop-by-logo-section-image, | ||
| button.thumbnail-item:not(.selected):hover img { | ||
| button.thumbnail-item:not(.selected):hover img, | ||
| img[style^="mix-blend-mode: darken"], |
There was a problem hiding this comment.
Seeing this gives me idea we should check if
img {
mix-blend-mode: normal !important;
}
Would not be better. In most cases all pictures on some shop sites should not have any mix-blend-mode set as they will be almost invisible in Dark Reader's Dark mode.
Entering specific selector will give us new PRs every time page will add something new not included in fixes.
There was a problem hiding this comment.
This suggestion seems to be possible without any issues.
| div.slider-container div[class$="ShopByLogosCarousel"] a > div > div, | ||
| div[class$="SectionContainer"] + div > a, | ||
| a[href^="/pressreleases/"] img { | ||
| background-color: #f7f8f7 !important; |
There was a problem hiding this comment.
If we would change mix-blend-mode to all img elements I think this whole section could be removed.
There was a problem hiding this comment.
I tried removing this section and it seems that some elements still need it.
Maybe we can remove all img elements from this section?
There was a problem hiding this comment.
After removing some img elements there are issues, so this section seems to be needed!
| div.shipping-textbox-header, | ||
| div[data-qa-element="SubscribeListContainer"] div:has(+ h4), | ||
| div[data-qa-element="SubscribeListContainer"] h4 strong { | ||
| div[data-qa-element="SubscribeListContainer"] h4 strong, |
There was a problem hiding this comment.
Again... adding specific paths for elements which work today can force make additional fixes in some days again.
If we have this container div[data-qa-element="SubscribeListMobileContainer"] problematic then maybe selector forcing color to all children would be better (still better if site will create some new approach to present text in different path inside.
Can you check div[data-qa-element="SubscribeListMobileContainer"] * instead of having this list growing?
Or maybe this will be outdated because we will set mix-blend-mode: normal for all images.
| div.house-brand-content-container div:is(.section-1, .section-2) { | ||
| background-image: none !important; | ||
| } | ||
| .parent-selector { |
There was a problem hiding this comment.
Can not find any element with class .parent-selector on mentioned pages.
Can not confirm this part of fix is needed.
| .parent-selector { | ||
| position: relative; | ||
| } | ||
| div:has(> div.quality-description) { |
There was a problem hiding this comment.
Can not find any div.quality-description on all sites I had opened today for tests.
There was a problem hiding this comment.
It is found in the mobile version only.
https://www.iherb.com/c/california-gold-nutrition
https://www.iherb.com/c/cgn-digestive-health
https://www.iherb.com/c/california-gold-nutrition-pure-sports
Click "Learn more about California Gold Nutrition".
| div[class^="scan-qr-login_qrCode"] svg * | ||
| div.shipping-textbox-subheader span | ||
| div.sc-social-media-list * | ||
| :is(section, div).footer-banner-container * |
| position: relative; | ||
| z-index: 2; | ||
| } | ||
| .parent-selector { |
There was a problem hiding this comment.
Why this is repeated?
And I already mentioned this for line R794
Can not find any element with class .parent-selector on mentioned pages.
Can not confirm this part of fix is needed.
|
In the mobile version: with a single line: I am using the full path because there are many random classes. |
|
This is required: See the desktop version. |
|
I think that after mix-blend-mode: normal on all images, the background section may be shortened. |


Need to use more specific selector in order to define text color only on the desired images.