Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Replace z-index magic numbers with LESS variables #783

Merged
merged 3 commits into from May 2, 2012

Conversation

Projects
None yet
2 participants
Member

jasonsanjose commented May 1, 2012

Fix for #759

Contributor

redmunds commented May 2, 2012

reviewing

@redmunds redmunds and 1 other commented on an outdated diff May 2, 2012

src/styles/brackets_variables.less
+@sidebar-width: 200px;
+
+/* z-index */
+@z-index-cm-scrollbar: 1;
+@z-index-cm-gutter: 10;
+@z-index-cm-cursor: 10;
+@z-index-cm-dialog: 15;
+@z-index-cm-max: @z-index-cm-dialog;
+@z-index-cm-dialog-override: 11;
@redmunds

redmunds May 2, 2012

Contributor

I think the group of z-indexes is easier to understand if they are in numerical order.

@redmunds redmunds and 1 other commented on an outdated diff May 2, 2012

src/styles/brackets_variables.less
+@z-index-cm-gutter: 10;
+@z-index-cm-cursor: 10;
+@z-index-cm-dialog: 15;
+@z-index-cm-max: @z-index-cm-dialog;
+@z-index-cm-dialog-override: 11;
+
+@z-index-jstree-drag: 10000;
+@z-index-jstree-marker: 10001;
+
+@z-index-bootstrap-dropdown: 900;
+@z-index-bootstrap-popup: 1000;
+@z-index-bootstrap-topbar: 10000;
+@z-index-bootstrap-modal-backdrop: 10000;
+@z-index-bootstrap-modal: 11000;
+@z-index-bootstrap-modal-popup: 12000;
@redmunds

redmunds May 2, 2012

Contributor

Where are these used?

@jasonsanjose

jasonsanjose May 2, 2012

Member

Internally in Bootstrap. I copied these values from their LESS files as reference points. They are not currently used by Brackets code.

@redmunds

redmunds May 2, 2012

Contributor

I am not sure it's worth copying variables that we do not change, because if we update any of these underlying frameworks and they change a value, then we'll unknowingly override it.

@jasonsanjose

jasonsanjose May 2, 2012

Member

Ok, I'll remove the unused vars.

@redmunds redmunds and 1 other commented on an outdated diff May 2, 2012

src/styles/brackets_variables.less
+@z-index-cm-dialog-override: 11;
+
+@z-index-jstree-drag: 10000;
+@z-index-jstree-marker: 10001;
+
+@z-index-bootstrap-dropdown: 900;
+@z-index-bootstrap-popup: 1000;
+@z-index-bootstrap-topbar: 10000;
+@z-index-bootstrap-modal-backdrop: 10000;
+@z-index-bootstrap-modal: 11000;
+@z-index-bootstrap-modal-popup: 12000;
+
+@z-index-brackets-ui: @z-index-cm-max + 1;
+@z-index-brackets-selection-triangle: @z-index-brackets-ui;
+@z-index-brackets-results-panel: @z-index-brackets-ui;
@redmunds

redmunds May 2, 2012

Contributor

@z-index-brackets-results-panel was 19 and @z-index-brackets-triangle was 10, and now they are both 16. Is that ok?

@jasonsanjose

jasonsanjose May 2, 2012

Member

In this case, yes. These element's don't share the same scope.

Contributor

redmunds commented May 2, 2012

Done with initial review.

Member

jasonsanjose commented May 2, 2012

Pushed changes. Responded to comments.

Member

jasonsanjose commented May 2, 2012

Removed unused vars per last comment.

@redmunds redmunds added a commit that referenced this pull request May 2, 2012

@redmunds redmunds Merge pull request #783 from adobe/jason-sanjose/issue759
Replace z-index magic numbers with LESS variables
3a3ed57

@redmunds redmunds merged commit 3a3ed57 into master May 2, 2012

@Pomax Pomax pushed a commit to Pomax/brackets that referenced this pull request Jun 13, 2017

@auracle @flukeout auracle + flukeout Fix #2232: Use a darker color for right-clicked selected file indicat…
…or (#783)
2e628cb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment