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

feat(Responsive): add ExtraExtraSmall breakpoint #2215

Merged
merged 5 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
body:before {
content: "extraSmall";
body:before {
content: "extraExtraSmall";
display: none;
}

@media (min-width:375px) {
body:before {
content: "extraSmall";
}
}

@media (min-width:576px) {
body:before {
content: "small";
Expand Down
19 changes: 12 additions & 7 deletions src/BootstrapBlazor/Enums/BreakPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace BootstrapBlazor.Components;

/// <summary>
///
/// BreakPoint 枚举
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter))]
public enum BreakPoint
Expand All @@ -18,32 +18,37 @@ public enum BreakPoint
None,

/// <summary>
/// 未设置
/// 超小屏幕 小于 375px
/// </summary>
ExtraExtraSmall,

/// <summary>
/// 超小屏幕 大于等于 375px
/// </summary>
ExtraSmall,

/// <summary>
/// 小屏幕 576px
/// 小屏幕 大于等于 576px
/// </summary>
Small,

/// <summary>
/// 中屏幕 768px
/// 中屏幕 大于等于 768px
/// </summary>
Medium,

/// <summary>
/// 大屏幕 992px
/// 大屏幕 大于等于 992px
/// </summary>
Large,

/// <summary>
/// 超大屏幕 1200px
/// 超大屏幕 大于等于 1200px
/// </summary>
ExtraLarge,

/// <summary>
/// 超大屏幕 1400px
/// 超大屏幕 大于等于 1400px
/// </summary>
ExtraExtraLarge
}

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion src/BootstrapBlazor/wwwroot/scss/bootstrap.blazor.css
Original file line number Diff line number Diff line change
Expand Up @@ -4272,10 +4272,15 @@ form .form-control.is-display {
}

body:before {
content: "extraSmall";
content: "extraExtraSmall";
display: none;
}

@media (min-width: 375px) {
body:before {
content: "extraSmall";
}
}
@media (min-width: 576px) {
body:before {
content: "small";
Expand Down
2 changes: 1 addition & 1 deletion src/BootstrapBlazor/wwwroot/scss/bootstrap.blazor.min.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

namespace UnitTest.Components;

public class ReponsiveTest : BootstrapBlazorTestBase
public class ResponsiveTest : BootstrapBlazorTestBase
{
[Fact]
public void Resposive_Ok()
public void Responsive_Ok()
{
BreakPoint? point = null;
var cut = Context.RenderComponent<BootstrapBlazorRoot>(pb =>
Expand Down