linuxmint / linuxmint/cinnamon

Negative margin property breaks things, depending on applied-to elements

Open
#9,319 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

BUG
Dominant language
JavaScript
Stars
5.6k
Forks
915
Avg merge
5d 22h
Merged PRs (30d)
3

Description

 * Cinnamon version - 4.4.8
 * Distribution - Linux Mint 19.3
 * Graphics hardware *and* driver used - "Intel Corporation Device 3e9b" (HD Graphics) + GeForce GTX 1050 Mobile, set to the former via NVIDIA X Server Settings; as a result the driver manager doesn't show anything, all I know is it's the default open-source one
 * 64-bit

Issue
Using a negative margin in a theme (which should be allowed AFAICT) can cause a variety of glitches. The two I found so far were:

  • when applied to .applet-box horizontally on a horizontal panel (didn't check vertical), makes everything after the negative margin disappear
  • when applied to .calendar-day-heading (tested with margin-top), changing to the negative-margin-containing theme doesn't cause an update to the panels

Steps to reproduce

  1. Copy one of the default themes to ~/home/.themes and change its name.
  2. In cinnamon.css, add a margin(-left, -right, etc.) property with a negative value to one of the classes
  3. Switch to the modified theme.

Expected behaviour
https://www.quirksmode.org/blog/archives/2020/02/negative_margin.html

Other information
I wanted to use it to nudge the leftmost two applets on my panel closer together without moving anything else, there's your use case. I ended up using :last-child instead, since my panel's left side only has the two applets.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with a modified theme's cinnamon.css, testing negative margins on .applet-box and .calendar-day-heading. Trace how those selectors affect panel layout and theme switching; done means negative margins render without hiding later elements and switching themes updates the panels correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.