GithubHelp home page GithubHelp logo

Comments (8)

b3by avatar b3by commented on July 18, 2024

Thank you for this. I'll look into it ASAP, as the rendering position has been an issue for quite a while. On which platform you experienced this problem?

from atom-clock.

AndrewBastin avatar AndrewBastin commented on July 18, 2024

I am experiencing this in Windows...

from atom-clock.

b3by avatar b3by commented on July 18, 2024

I'm fixing this right now. It seems to be a thing on OS X as well.

from atom-clock.

ftm avatar ftm commented on July 18, 2024

Removing all the CSS and adding the inline-block class to the clock element seemed to fix it for me. I'm on OS X by the way.

atom-clock.less:

@import "ui-variables";

.atom-clock {
  // display: inline-block;
  // margin-left: 1em;
  // margin-right: 0.5em;
  // position: relative;
  // vertical-align: middle;
  //
  // .span {
  //   text-align: left;
  // }
}

atom-clock-view.js:

drawElement() {
    this.element = document.createElement('div')
    this.element.className = 'atom-clock inline-block'
    this.element.appendChild(document.createElement('span'))

    this.statusBar.addRightTile({
      item: this.element,
      priority: -1
    })
  }

See before (top) and after (bottom)
screen shot 2017-05-25 at 11 33 00

from atom-clock.

b3by avatar b3by commented on July 18, 2024

I actually did not change the code, just the style file, adding some stuff for the icon. The result seems to be pretty much the same.

@import "ui-variables";
@import "octicon-mixins";

.atom-clock {
  display: inline-block;
  position: relative;

  .icon:before {
    .icon-size(14px);
    top: 1px;
    margin-right: 3px;
  }

}

from atom-clock.

b3by avatar b3by commented on July 18, 2024

Actually, the atom-clock class should also have margin-left set to @component-padding, so that there will be space between the clock and the element to the left.

from atom-clock.

b3by avatar b3by commented on July 18, 2024

Seems to be reasonable. I still don't know whether this is the right solution, or the css style is useless.

screenshot 2017-05-26 00 05 48

from atom-clock.

ftm avatar ftm commented on July 18, 2024

The inline-block class seems to add margin-left: 1.5em so maybe the CSS could just be used to move the icon around. Up to you I guess, it seems to be what other packages are using

from atom-clock.

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.