0
import React from 'react';
import styled from 'styled-components';

const Thing = styled.div`
  color: blue;

  .something {
    border: 1px solid; // an element labeled ".something" inside <Thing>
    display: block;
  }
`;

const Something = () => {
  return (
    <Thing>
      <label htmlFor="foo-button" className="something">
        Mystery button
      </label>
      <button id="foo-button">What do I do?</button>
    </Thing>
  );
};

I wrote the code like this and I expect the button font color applied also be blue. But, the button's font color is just black. why?

Naruto_333
  • 33
  • 3

0 Answers0