Skip to content

Scroll horizontal shown when using * { box-sizing: content-box } (Tailwind base) #240

Closed
@colelawrence

Description

@colelawrence

I fixed this issue by adding the following CSS to my own project to override base tailwind.

.ch-codeblock * {
  /* Fix horizontal scrollbars added to CodeHike blocks as a result of tailwind screwing up measurements */
  box-sizing: content-box;
}

This might be something that Code-Hike should include in its stylesheet.

I was able to demonstrate this in the yarn dev

After adding * { box-sizing: content-box }:
Cole's screenshot of Code Hike Test - section 2022-07-26 at 07 57 41@2x

Before (Bug)
Cole's screenshot of Code Hike Test - section 2022-07-26 at 07 57 19@2x

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions