Giter Site home page Giter Site logo

Comments (2)

geom3trik avatar geom3trik commented on May 28, 2024

I think the behaviour is correct, the bit that's confusing things (I think) is that the transform happens relative to the centre of the label. I think to get what you want you could shift the label (before transform) so that it's left edge is centered (left: 50%), and then set the transform origin to the center of the left side (transform-origin: center left). Then after rotation it would place the label 10px + half the height of the label from the bottom:

image

Some tweaking on the bottom property might be needed to place it where you want.

The css looks like this (based on your example):

.module-sidebar-title {
  top: 1s;
  width: auto;
  height: 20px;
  overflow: visible;
  bottom: 10px;
  border-width: 1px;
  border-color: red;
  z-index: 200;
  /* child-right: 1s; */
  rotate: -90deg;
  transform-origin: center left;
  left: 50%;
  color: #ffffff;
}

from vizia.

Fredemus avatar Fredemus commented on May 28, 2024

Ah, I think that makes sense. I was thinking that the label gets built and drawn and then the bottom: 10px is done to the result of that, i.e. the bottom of the red borders around the label is placed 10 pixels from the bottom of the Vstack.

from vizia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.