Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(@clayui/modal) - Adjust pagginds on smaller screens and zooming #5686

Closed
wants to merge 1 commit into from

Conversation

ilzamcmed
Copy link
Member

@ilzamcmed
Copy link
Member Author

Hey @pat270
Can you review it?
Thanks!

@pat270 pat270 self-requested a review October 6, 2023 19:31
@@ -222,6 +222,10 @@

.modal-content {
@include box-shadow($modal-content-box-shadow-sm-up);

.modal-body, .modal-header {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to make any modifications to /bootstrap/. We don't have any use cases of it in 7.4. This gets me thinking, we should remove it from the source.


.modal-body,
.modal-header {
padding: 1.5rem;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ilzamcmed This will be a more complicated fix unfortunately. I want to leverage

@mixin clay-generate-media-breakpoints($map, $mixin: 'clay-css') {
@if (type-of($map) == 'map') {
@if (map-get($map, media-breakpoint-up)) {
$media-breakpoint-up: map-get($map, media-breakpoint-up);
@each $breakpoint in map-keys($media-breakpoint-up) {
$breakpoint-up: map-get($media-breakpoint-up, $breakpoint);
@include media-breakpoint-up($breakpoint) {
@if ($mixin == 'clay-css') {
@include clay-css($breakpoint-up);
} @else if ($mixin == 'clay-button-variant') {
@include clay-button-variant($breakpoint-up);
} @else if ($mixin == 'clay-input-group-variant') {
@include clay-input-group-variant($breakpoint-up);
} @else if ($mixin == 'clay-input-group-text-variant') {
@include clay-input-group-text-variant($breakpoint-up);
} @else if ($mixin == 'clay-dropdown-menu-variant') {
@include clay-dropdown-menu-variant($breakpoint-up);
} @else if ($mixin == 'clay-menubar-vertical-variant') {
@include clay-menubar-vertical-variant($breakpoint-up);
} @else if ($mixin == 'clay-select-variant') {
@include clay-select-variant($breakpoint-up);
}
}
}
}
@if (map-get($map, media-breakpoint-down)) {
$media-breakpoint-down: map-get($map, media-breakpoint-down);
@each $breakpoint in map-keys($media-breakpoint-down) {
$breakpoint-down: map-get($media-breakpoint-down, $breakpoint);
@include media-breakpoint-down($breakpoint) {
@if ($mixin == 'clay-css') {
@include clay-css($breakpoint-down);
} @else if ($mixin == 'clay-button-variant') {
@include clay-button-variant($breakpoint-down);
} @else if ($mixin == 'clay-input-group-variant') {
@include clay-input-group-variant($breakpoint-down);
} @else if ($mixin == 'clay-input-group-text-variant') {
@include clay-input-group-text-variant(
$breakpoint-down
);
} @else if ($mixin == 'clay-dropdown-menu-variant') {
@include clay-dropdown-menu-variant($breakpoint-down);
} @else if ($mixin == 'clay-menubar-vertical-variant') {
@include clay-menubar-vertical-variant(
$breakpoint-down
);
} @else if ($mixin == 'clay-select-variant') {
@include clay-select-variant($breakpoint-down);
}
}
}
}
}
}
and
@mixin clay-map-to-css($map) {
@include clay-css($map);
@each $key, $value in $map {
@if not clay-is-map-unset($value) {
@if (type-of($value) == 'map') {
$valid-prefixes: '#', '&', '.', '>', '@', '~', '+', '[';
$selector: if(
index($valid-prefixes, str-slice($key, 1, 1)),
$key,
str-insert($key, '.', 1)
);
@if (starts-with($selector, '@media ')) {
@media #{clay-str-replace('#{$selector}', '@media ', '')} {
@include clay-map-to-css($value);
}
} @else {
#{$selector} {
@include clay-map-to-css($value);
}
}
}
}
}
}
.

Let me know if you're up for it or I can send an update to this one.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @pat270
I believe it's better if you update this one, it will be quicker.
But I will be following to see the changes you made and learn something.
Thanks! 🚀

@ilzamcmed ilzamcmed closed this Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants