question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Simplify viewport and root font-size setting scripts

See original GitHub issue
import { hd } from 'antd-mobile'

hd()

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
benjycuicommented, Jun 30, 2017

hd => enableHD 😄

0reactions
paranoidjkcommented, Aug 21, 2017

close in https://github.com/ant-design/ant-design-mobile/pull/1713/

antd-mobile@2.0 适配方案

  1. @ustccjw 改造了1px 线的实现,默认不依赖 viewport 缩放,html 上加上 data-scale 属性的时候,回退到 normal 的border,即 viewport 缩放
  2. 在 1 的前提下, antd-mobile 默认就不再依赖 viewport 缩放,则对外提供的都是 1 倍(375)的 px 样式。
  3. 如果用户自己要使用 viewport 缩放,确保在 html 上加上 data-scale 属性,并用 post-css 处理样式 (会体现在文档)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Viewport Sized Typography | CSS-Tricks
When the browser window is resized, the font doesn't adjust itself according to the new viewport size. The spec says:.
Read more >
Change font size in Vuetify based on viewport? - Stack Overflow
This will allow you to assign/apply specific properties and attributes based upon viewport size. One possible (and rather direct way) is ...
Read more >
Responsive fonts - auto-scaling root font-size in pure CSS
The root font-size scales up and down proportionately, between defined values, dependent upon the viewport width. Easy-peasy, stretch & squeezy. Simplify your ...
Read more >
Is it a good habit to use vw for font size and % for padding?
I like to use % for the root font size, then use rem for all the fonts in the page. That way the...
Read more >
Responsive fonts - auto-scaling the root font-size
Using pure CSS the root font size scales up and down proportionately, between defined values, dependent upon the viewport width.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found