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>
);
};
我写了这样的代码,我希望按钮字体颜色也应用蓝色。但按钮的字体颜色只是黑色。为什么?