File size: 543 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import React from 'react';
import { Flex } from 'antd';

const styleTxt = `
  @scope (.blog-css-tricks-a) to (span) {
    color: red;
  }

  .blog-css-tricks-b {
    color: blue;
  }
`;

export default () => (
  <Flex vertical gap="middle">
    <style>{styleTxt}</style>
    <div className="blog-css-tricks-a">
      <span>Should be red</span>
    </div>
    <div className="blog-css-tricks-a">
      <span>
        <div className="blog-css-tricks-b">
          <span>Should be blue</span>
        </div>
      </span>
    </div>
  </Flex>
);