-
Notifications
You must be signed in to change notification settings - Fork 17
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
AEM-3796 - Testimonials #555
Conversation
- Added new option to show all elements inline and disable slider.
@@ -167,6 +167,14 @@ $o-testimonials-author-position-bottom: -40px; | |||
animation: fromRight 0.8s; | |||
} | |||
|
|||
axa-testimonials[show-all-inline="true"] .o-testimonials__item-author { |
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.
please add a modifier class here instead of going onto the rendered show-all-inline attribute
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.
like .o-testimonials--show-all-inline
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.
would the below be fine?
.o-testimonials--show-all-inline .o-testimonials__item-author {
// css goes here
}
because I need this css to be applied on optional div in the child fragment.
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.
Updated.
- used modifier class instead of attribute.
this.hideAllSlides(); | ||
if (this.slides.length < 2) { | ||
// if there is only 1 slide or the option to show all slides is enabled hide the slide controls. | ||
if (this.slides.length < 2 || this.showAllInline) { |
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.
May it's nicer to invert the logic here and only call showControls
if they are 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.
Updated.
@@ -167,6 +167,14 @@ $o-testimonials-author-position-bottom: -40px; | |||
animation: fromRight 0.8s; | |||
} | |||
|
|||
.o-testimonials--show-all-inline .o-testimonials__item-author { |
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 are currently discussing CSS specificity and the goal of zero CSS specificity inclination #383
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.
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.
@nakovskijosif
I would not worry about it right now, we already have higher CSS specificity code and it's an idea we think could be worth it
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.
is fine as it is @nakovskijosif
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.
Fine with me
- controls visibility logic inverted.
Fixes # (AEM-3796)
Changes proposed in this pull request:
Type of change
How Has This Been Tested?
Checklist: