Make the z-index management open for the developers #5352
Labels
package:ui
status:discussion
support:2
An issue reported by a commercially licensed client.
type:improvement
This issue reports a possible enhancement of an existing feature.
ATM we use a
ck-z
mixin to configure thez-index
in the project. The problem is that developers may find them wrong, e.g. because they collide with other web page elements like modals, overlays, etc. but there's no easy way to change them.Solution 1
Use the power of
SASS
!default
and do something similar to what we did with colors.Pros:
Cons:
ck-z( 'modal' )
can be used in many places in the code, and devs who will fight it will need to override dozens of unrelated selectors to get their correct value right.Solution 2
Switch to class-driven
z-index
management. The SASS helper will generate a set of classes like.ck-z_default
,.ck-z_modal
, with pre-defined values, which then will be used in the templates to assign the desired index.Pros:
.ck-z_modal { z-index: my value }
in the custom styles sheet to override the z-index for the entire project..ck-z_default
,.ck-z_modal
, ... ) represent the right values..foo { @extend .ck-z_modal }
, like.foo { z-index: ck-z( 'modal' ) }
Cons:
.ck-z_*
classes.The text was updated successfully, but these errors were encountered: