(("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd=("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd||[]).push([["39a1999c"],{"39a1999c":function(e,a,n){"use strict";n.d(a,"__esModule",{value:!0}),n.d(a,"texts",{enumerable:!0,get:function(){return r;}}),n("c716787e");let r=[{value:"Ant Design supports the ",paraId:0,tocIndex:0},{value:"last 2 versions of modern browsers",paraId:0,tocIndex:0},{value:". If you need to be compatible with legacy browsers, please perform downgrade processing according to actual needs:",paraId:0,tocIndex:0},{value:"Feature",paraId:1,tocIndex:0},{value:"antd version",paraId:1,tocIndex:0},{value:"Compatibility",paraId:1,tocIndex:0},{value:"Minimum Chrome Version",paraId:1,tocIndex:0},{value:"Compatibility workaround",paraId:1,tocIndex:0},{value:":where Selector",paraId:1,tocIndex:0},{value:">=5.0.0",paraId:1,tocIndex:0},{value:"caniuse",paraId:1,tocIndex:0},{value:"Chrome 88",paraId:1,tocIndex:0},{value:'',paraId:1,tocIndex:0},{value:"CSS Logical Properties",paraId:1,tocIndex:0},{value:">=5.0.0",paraId:1,tocIndex:0},{value:"caniuse",paraId:1,tocIndex:0},{value:"Chrome 89",paraId:1,tocIndex:0},{value:"",paraId:1,tocIndex:0},{value:"If you need to support older browsers, please use ",paraId:2,tocIndex:0},{value:"StyleProvider",paraId:2,tocIndex:0},{value:" for degradation handling according to your actual requirements.",paraId:2,tocIndex:0},{value:":where",paraId:3},{value:"antd version: ",paraId:4,tocIndex:1},{value:">=5.0.0",paraId:4,tocIndex:1},{value:"MDN: ",paraId:4,tocIndex:1},{value:":where",paraId:4,tocIndex:1},{value:"Browser Compatibility: ",paraId:4,tocIndex:1},{value:"caniuse",paraId:4,tocIndex:1},{value:"Minimum Chrome Version Supported: 88",paraId:4,tocIndex:1},{value:"Default Enabled: Yes",paraId:4,tocIndex:1},{value:'The CSS-in-JS feature of Ant Design uses the ":where" selector by default to lower the CSS selector specificity, reducing the additional cost of adjusting custom styles when upgrading for users. However, the compatibility of the ":where" syntax is relatively poor in older browsers (',paraId:5,tocIndex:1},{value:"compatibility",paraId:5,tocIndex:1},{value:"). In certain scenarios, if you need to support older browsers, you can use ",paraId:5,tocIndex:1},{value:"@ant-design/cssinjs",paraId:5,tocIndex:1},{value:" to disable the default lowering of specificity (please ensure version consistency with antd).",paraId:5,tocIndex:1},{value:"import { StyleProvider } from '@ant-design/cssinjs';\n\n// Config `hashPriority` to `high` instead of default `low`\n// Which will remove `:where` wrapper\nexport default () => (\n \n \n \n);\n",paraId:6,tocIndex:1},{value:"It will turn ",paraId:7,tocIndex:1},{value:":where",paraId:7,tocIndex:1},{value:" to class selector:",paraId:7,tocIndex:1},{value:"-- :where(.css-bAMboO).ant-btn {\n++ .css-bAMboO.ant-btn {\n color: #fff;\n }\n",paraId:8,tocIndex:1},{value:"Note: After turning off the ",paraId:9,tocIndex:1},{value:":where",paraId:9,tocIndex:1},{value:" downgrade, you may need to manually adjust the priority of some styles. Or you can ",paraId:9,tocIndex:1},{value:"use PostCSS plugin",paraId:9,tocIndex:1},{value:" to raise application css selector priority. PostCSS provides many plugins can help on this. e.g:",paraId:9,tocIndex:1},{value:"postcss-scopify",paraId:10,tocIndex:1},{value:"postcss-increase-specificity",paraId:10,tocIndex:1},{value:"postcss-add-root-selector",paraId:10,tocIndex:1},{value:"Raise priority through plugin:",paraId:11,tocIndex:1},{value:"-- .my-btn {\n++ #root .my-btn {\n background: red;\n }\n",paraId:12,tocIndex:1},{value:"antd version: ",paraId:13,tocIndex:2},{value:">=5.0.0",paraId:13,tocIndex:2},{value:"MDN\uFF1A",paraId:13,tocIndex:2},{value:"CSS Logical Properties",paraId:13,tocIndex:2},{value:"Browser Compatibility: ",paraId:13,tocIndex:2},{value:"caniuse",paraId:13,tocIndex:2},{value:"Minimum Chrome Version Supported: 89",paraId:13,tocIndex:2},{value:"Default Enabled: Yes",paraId:13,tocIndex:2},{value:"To unify LTR and RTL styles, Ant Design uses CSS logical properties. For example, the original ",paraId:14,tocIndex:2},{value:"margin-left",paraId:14,tocIndex:2},{value:" is replaced by ",paraId:14,tocIndex:2},{value:"margin-inline-start",paraId:14,tocIndex:2},{value:", so that it is the starting position spacing under both LTR and RTL. If you need to be compatible with older browsers, you can configure ",paraId:14,tocIndex:2},{value:"transformers",paraId:14,tocIndex:2},{value:" through the ",paraId:14,tocIndex:2},{value:"StyleProvider",paraId:14,tocIndex:2},{value:" of ",paraId:14,tocIndex:2},{value:"@ant-design/cssinjs",paraId:14,tocIndex:2},{value:":",paraId:14,tocIndex:2},{value:"import { legacyLogicalPropertiesTransformer, StyleProvider } from '@ant-design/cssinjs';\n\n// `transformers` provides a way to transform CSS properties\nexport default () => (\n \n \n \n);\n",paraId:15,tocIndex:2},{value:"When toggled, styles will downgrade CSS logical properties:",paraId:16,tocIndex:2},{value:".ant-modal-root {\n-- inset: 0;\n++ top: 0;\n++ right: 0;\n++ bottom: 0;\n++ left: 0;\n}\n",paraId:17,tocIndex:2},{value:"@layer",paraId:3},{value:"antd version: ",paraId:18,tocIndex:3},{value:">=5.17.0",paraId:18,tocIndex:3},{value:"MDN\uFF1A",paraId:18,tocIndex:3},{value:"CSS @layer",paraId:18,tocIndex:3},{value:"Browser Compatibility: ",paraId:18,tocIndex:3},{value:"caniuse",paraId:18,tocIndex:3},{value:"Minimum Chrome Version Supported: 99",paraId:18,tocIndex:3},{value:"Default Enabled: No",paraId:18,tocIndex:3},{value:"Ant Design supports configuring ",paraId:19,tocIndex:3},{value:"@layer",paraId:19,tocIndex:3},{value:" for unified css priority downgrade since ",paraId:19,tocIndex:3},{value:"5.17.0",paraId:19,tocIndex:3},{value:". After the downgrade, the style of antd will always be lower than the default CSS selector priority, so that users can override the style (please be sure to check the browser compatibility of ",paraId:19,tocIndex:3},{value:"@layer",paraId:19,tocIndex:3},{value:").When enable ",paraId:19,tocIndex:3},{value:"layer",paraId:19,tocIndex:3},{value:", the child element ",paraId:19,tocIndex:3},{value:"must",paraId:19,tocIndex:3},{value:" wrap ",paraId:19,tocIndex:3},{value:"ConfigProvider",paraId:19,tocIndex:3},{value:" to update the icon-related styles:",paraId:19,tocIndex:3},{value:"import { StyleProvider } from '@ant-design/cssinjs';\nimport { ConfigProvider } from 'antd';\n\nexport default () => (\n \n \n \n \n \n);\n",paraId:20,tocIndex:3},{value:"antd styles will be encapsulated in ",paraId:21,tocIndex:3},{value:"@layer",paraId:21,tocIndex:3},{value:" to lower the priority:",paraId:21,tocIndex:3},{value:"++ @layer antd {\n :where(.css-bAMboO).ant-btn {\n color: #fff;\n }\n++ }\n",paraId:22,tocIndex:3},{value:"In responsive web development, there is a need for a convenient and flexible way to achieve page adaptation and responsive design. The ",paraId:23,tocIndex:4},{value:"px2remTransformer",paraId:23,tocIndex:4},{value:" transformer can quickly and accurately convert pixel units in style sheets to rem units relative to the root element (HTML tag), enabling the implementation of adaptive and responsive layouts.",paraId:23,tocIndex:4},{value:"import { px2remTransformer, StyleProvider } from '@ant-design/cssinjs';\n\nconst px2rem = px2remTransformer({\n rootValue: 32, // 32px = 1rem; @default 16\n});\n\nexport default () => (\n \n \n \n);\n",paraId:24,tocIndex:4},{value:"The resulting transformed styles:",paraId:25,tocIndex:4},{value:" .px2rem-box {\n- width: 400px;\n+ width: 12.5rem;\n background-color: green;\n- font-size: 32px;\n+ font-size: 1rem;\n border: 10PX solid #f0f;\n }\n\n @media only screen and (max-width: 600px) {\n .px2rem-box {\n background-color: red;\n- margin: 10px;\n+ margin: 0.3125rem;\n }\n }\n",paraId:26,tocIndex:4},{value:"Parameter",paraId:27,tocIndex:5},{value:"Description",paraId:27,tocIndex:5},{value:"Type",paraId:27,tocIndex:5},{value:"Default",paraId:27,tocIndex:5},{value:"rootValue",paraId:27,tocIndex:5},{value:"Font size of the root element",paraId:27,tocIndex:5},{value:"number",paraId:27,tocIndex:5},{value:"16",paraId:27,tocIndex:5},{value:"precision",paraId:27,tocIndex:5},{value:"Decimal places for the converted value",paraId:27,tocIndex:5},{value:"number",paraId:27,tocIndex:5},{value:"5",paraId:27,tocIndex:5},{value:"mediaQuery",paraId:27,tocIndex:5},{value:"Whether to convert px in media queries",paraId:27,tocIndex:5},{value:"boolean",paraId:27,tocIndex:5},{value:"false",paraId:27,tocIndex:5},{value:"For more details, please refer to: ",paraId:28,tocIndex:5},{value:"px2rem.ts#Options",paraId:28,tocIndex:5},{value:"Since ",paraId:29,tocIndex:6},{value:"\n\n \n \n \n \n\n',paraId:44,tocIndex:15},{value:'\n \n \n \n \n\n \n \n\n',paraId:45,tocIndex:16}];}}]);