I have project on Gatsby+SASS and trying to implement next hover effect ---> I have titele h1 and parent arrow element - FontAwesomeIcon. And I wanna implement CSS properties for FontAwesomeIcon element when I hover title h1. So I know that in pure HTML and CSS I can do it with ".title:hover .arrow { transform: translateX(100px);} or like this ".title:hover~.arrow { transform: translateX(100px);}. In SASS I only can use .block:hover{.title {transform: translateX(100px);}}. Is it possible to implement such effect without parent element for childrens (title and arrow)?
import React from "react"
import style from "./mainPromo.module.sass"
import classNames from "../../helpers/classNames"
import Slider from "react-slick"
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'
import {faArrowRight} from '@fortawesome/free-solid-svg-icons'
const MainPromo = () => {
const settings = {
slidesToShow: 1,
slidesToScroll: 1,
infinite: true,
arrows: false,
dotsClass: "orange_line_slick_dots",
dots: true,
}
return (
<Slider className={classNames(style.section, style.promo)} {...settings}>
<div>
<div
className={classNames(
style.section,
style.justify_center,
style.outcomes
)}
>
<div className={classNames(style.content_1600, style.flow_row)}>
<div className={style.outcomes_info}>
<h1 className={style.outcomes_h1}>
Web development
</h1>
<p className={style.outcomes_p}>
Web-based solutions for small and medium enterprises and startups
</p>
</div>
<div className="outcomes_arrow">
<FontAwesomeIcon icon={faArrowRight}/>
</div>
</div>
</div>
</div>
</Slider>
)
}
export default MainPromo
SASS
.outcomes_arrow
padding: 120px 0 0 40px
font-size: 5rem
transition: 1s
.outcomes_h1:hover~.outcomes_arrow
transform: translateX(100px)