Home  >  Q&A  >  body text

Macbook Safari displays hidden/overflow text as stacked

I'm using Amplify UI in the React library and making a card that displays the user and some of his information. However, if they have too much information, the overflow is cut off and can be seen on another page. Everything looks fine except for some users' Macbooks. I'm confused because I haven't had this problem even with my Iphone.

The user card should look like this:

But on some people's MacBooks it ends up looking like this:

Please ignore the red mark of personal information.

Here's how I call Amplify the component generated from Figma code:

Bio: {
                    overflow: "fade",
                    style: {
                      WebkitOverflowScrolling: "touch", // for webit browsers to prevent stacked letters
                      whiteSpace: "nowrap",
                    },
                    maxHeight: "80px",
                    fontSize: { base: ".875rem", medium: ".875rem" },
                  },
                  Subjects: {
                    alignItems: "flex-start",
                    overflow: "clip",
                    style: {
                      WebkitOverflowScrolling: "touch", // for webit browsers to prevent stacked letters
                      whiteSpace: "nowrap",
                    },
                    maxHeight: "60px",
                    wrap: "wrap",
                    gap: "xs",
                    alignContent: "flex-start",
                  },

Here is the component code snippet generated by Amplify:

<Flex
          gap="4px"
          direction="row"
          width="unset"
          height="unset"
          justifyContent="flex-start"
          alignItems="center"
          shrink="0"
          position="relative"
          padding="0px 0px 0px 0px"
          children={subjects}
          {...getOverrideProps(overrides, "Subjects")}
        ></Flex>
...
<Text
          fontFamily="Inter"
          fontSize="16px"
          fontWeight="400"
          color="rgba(48,64,80,1)"
          lineHeight="24px"
          textAlign="left"
          display="block"
          direction="column"
          justifyContent="unset"
          width="unset"
          height="unset"
          gap="unset"
          alignItems="unset"
          shrink="0"
          alignSelf="stretch"
          position="relative"
          padding="0px 0px 0px 0px"
          whiteSpace="pre-wrap"
          isTruncated={true}
          children={tutor?.bio}
          {...getOverrideProps(overrides, "Bio")}
        ></Text>

Is there anything else I can add to these containers so that MacBook safari now displays stacked information?

P粉466909449P粉466909449225 days ago495

reply all(1)I'll reply

  • P粉287726308
  • Cancelreply