Skip to content

How do I set min-sizes in pixels? #9

Description

@MarcSkovMadsen

Hi @alesgenova

split-me works really well. Thanks for sharing.

Just a question: How would I set min-sizes in pixels? In my use case (proxy example below) I need the left sidebar to be minimum 200px wide. Is that possible and how?

image

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Split Me Example</title>
    <script src="https://unpkg.com/split-me/dist/split-me.js"></script>
    <style>
        body {
            margin: 0px;
            width: 100vw;
            min-height: 100vh;
        }
        .dark {
            background: black;
            color: white;
        }
        .fill {
            min-height: 100vh;
            width: 100%;
        }
        .red {
            background: red;
        }
        .blue {
            background: blue;
        }
        </style>
    </head>
  <body>
    <split-me n="2" sizes="0.2, 0.8" min-sizes="0.1, 0.0">
        <div slot="0" class="fill dark"></div>
        <div slot="1" class="fill"></div>
      </split-me>
      <style>
        :root split-me {
            --divider-thickness: 8px; /* Thickness of the divider */
            --divider-color: lightgray; /* Background color of the divider */
            --divider-shadow: none; /* Shadow of the divider */
            --divider-image-h: url('https://raw.githubusercontent.com/MarcSkovMadsen/awesome-panel-extensions/master/assets/images/three_dots_vertical_5_18.png'); /* Background image of the divider when d="horizontal" */
            --divider-image-v: url('https://raw.githubusercontent.com/MarcSkovMadsen/awesome-panel-extensions/master/assets/images/three_dots_horizontal_5_18.png'); /* Background image of the divider when d="horizontal" */
        }
      </style>
  </body>

</html>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions