MichaelAquilina / improved-workspace-indicator

gnome-shell extension that provides a workspace indicator similar to i3/sway
42 stars 12 forks source link

Not an issue but question : purpose of some css lines ? #30

Closed Coeur-Noir closed 1 year ago

Coeur-Noir commented 1 year ago

Hi,

I've modified a bit the css stylesheet to get this : iwi_rounded and I think I'm happy with.

So here the css :

.panel-workspace-indicator {
  padding: 0 6px;
}

.panel-workspace-indicator-box {
  padding: 2px 0;
}

.panel-workspace-indicator-box .workspace {
  width: 40px;
}

.panel-workspace-indicator,
.panel-workspace-indicator-box .workspace {
  border: 2px rgba(0, 0, 0, 0.4);
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 19px;
}

.workspace-indicator-active {
  border: 2px solid #cccccc;
  background-color: rgba(0, 0, 0, 0.6);
}

As you may see, I have removed some lines as I couldn't find their purpose. Those lines :

.panel-workspace-indicator-box .workspace {
  background-color: rgba(200, 200, 200, 0.3);
  border-left-width: 0;
}

.panel-workspace-indicator-box .workspace:first-child {
  border-left-width: 1px;
}

Is it safe ? What did I « remove » ? What are they supposed to do ?

tfuxu commented 1 year ago

They serve completely no purpose, as .workspace class isn't (and wasn't even in version 1) used anywhere in code. I think it might have been used in GNOME 3.xx for something, so maybe you would want to leave them if you plan to use a machine with an outdated GNOME, but otherwise, you are safe to remove them.

MichaelAquilina commented 1 year ago

Is it safe ? What did I « remove » ? What are they supposed to do ?

It's very possible that I took these CSS statements from another extension and did not realise this was dead code. Unfortunately I cant remember where I took it from and I did not add a comment saying where it came from (which I definitely should have!)

Is the purpose of this Issue to ask specifically about what these are? Or is there something else I am mising?

Also thanks @tfuxu to passing along this insight!

tfuxu commented 1 year ago

Ah, you probably took stylesheet from the original workspace-indicator (stylesheet.css), as there is that .workspace class.

Is the purpose of this Issue to ask specifically about what these are?

I guess yes, as the issue title suggests

Coeur-Noir commented 1 year ago

Thanks all for the background story.

I was just wondering if I could safely remove those lines.

So yes, issue / question solved ;-)

Le 12 juin 2023 12:17:59 GMT+02:00, Michael Aquilina @.***> a écrit :

Is it safe ? What did I « remove » ? What are they supposed to do ?

It's very possible that I took these CSS statements from another extension and did not realise this was dead code. Unfortunately I cant remember where I took it from and I did not add a comment saying where it came from (which I definitely should have!)

Is the purpose of this Issue to ask specifically about what these are? Or is there something else I am mising?

Also thanks @tfuxu to passing along this insight!

-- Reply to this email directly or view it on GitHub: https://github.com/MichaelAquilina/improved-workspace-indicator/issues/30#issuecomment-1587031811 You are receiving this because you authored the thread.

Message ID: @.***>

Coeur-Noir commented 1 year ago

So it means I can also remove the other mentions of .workspace in that actual stylesheet ?

Le 12 juin 2023 17:32:06 GMT+02:00, tfuxu @.***> a écrit :

Ah, you probably took stylesheet from the original workspace-indicator (stylesheet.css), as there is that .workspace class.

Is the purpose of this Issue to ask specifically about what these are?

I guess yes, as the issue title suggests

-- Reply to this email directly or view it on GitHub: https://github.com/MichaelAquilina/improved-workspace-indicator/issues/30#issuecomment-1587576932 You are receiving this because you authored the thread.

Message ID: @.***>

tfuxu commented 1 year ago

So it means I can also remove the other mentions of .workspace in that actual stylesheet ?

Yes

Coeur-Noir commented 1 year ago

So, here is final piece of css :

.panel-workspace-indicator {
  padding: 0 6px;
}

.panel-workspace-indicator-box {
  padding: 2px 0;
}

.panel-workspace-indicator {
  border: 2px rgba(0, 0, 0, 0.4);
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 19px;
}

.workspace-indicator-active {
  border: 2px solid #cccccc;
  background-color: rgba(0, 0, 0, 0.6);
}