A
A
Andrew Foy2020-12-08 09:46:04
css
Andrew Foy, 2020-12-08 09:46:04

CSS pseudo classes not working?

css just doesn't recognize any pseudo-classes. I'm just learning and maybe this is a common problem, maybe I need to install some plugin?5fcf20e038aa3328817914.png

.button {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1.2rem;
  background-color: @btn-color;
  color: @light;
  text-transform: uppercase;
  border: none;
  transition: all 0.2s;
   &:hover {
    cursor: pointer;
    background-color: darken(@btn-color, 5%);
  }
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya Olovyannikov, 2020-12-08
@Arda4ek

Hey!
Your preprocessor code (LESS) must be compiled into CSS using a plugin (collector / npm script), since browsers cannot read a "non-native" language.
Googling a little about preprocessors and everything will work out! :)

A
approximate solution, 2020-12-08
@approximate_solution

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question