Skip to content

Commit 176226d

Browse files
committed
1.0.0-preview8-03
1 parent 4ca882c commit 176226d

File tree

65 files changed

+603
-285
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+603
-285
lines changed
Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Styled @bind-Classname="button">
1+
<Styled @bind-Classname="@button">
22
font-size:16px;
33
margin:18px;
44
border:none;
@@ -11,25 +11,28 @@
1111
color:#fff;
1212
box-shadow:0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
1313
background-color:@Color;
14-
&:hover {
15-
opacity: 0.7;
16-
transform:translateY(-1px);
17-
box-shadow:0 7px 14px rgba(50,50,93,.1), 0 3px 6px rgba(0,0,0,.08);
18-
}
19-
&:focus {
20-
outline:0;
21-
}
22-
&:active {
23-
transform:translateY(1px);
24-
}
14+
</Styled>
15+
16+
<Styled Classname="@button" PseudoClass="PseudoClasses.Hover">
17+
opacity: 0.7;
18+
transform:translateY(-1px);
19+
box-shadow:0 7px 14px rgba(50,50,93,.1), 0 3px 6px rgba(0,0,0,.08);
20+
</Styled>
21+
22+
<Styled Classname="@button" PseudoClass="PseudoClasses.Focus">
23+
outline:0;
24+
</Styled>
25+
26+
<Styled Classname="@button" PseudoClass="PseudoClasses.Active">
27+
transform:translateY(1px);
2528
</Styled>
2629

2730
<button class="@button" @onclick="@OnClick">@ChildContent</button>
2831

2932
@code {
30-
[Parameter] private RenderFragment ChildContent { get; set; }
31-
[Parameter] private EventCallback<UIMouseEventArgs> OnClick { get; set; }
32-
[Parameter] private string Color { get; set; } = "green";
33+
[Parameter] public RenderFragment ChildContent { get; set; }
34+
[Parameter] public EventCallback<UIMouseEventArgs> OnClick { get; set; }
35+
[Parameter] public string Color { get; set; } = "green";
3336

3437
private string button;
3538
}

docs/_content/SampleCore/index1.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
background-color: hotpink;
55
font-size: 24px;
66
border-radius: 4px;
7-
&:hover {
8-
color: @color;
9-
}
7+
</Styled>
8+
9+
<Styled Classname="@hover" PseudoClass="PseudoClasses.Hover">
10+
color: @color;
1011
</Styled>
1112

1213
<div class="@hover">
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
public class Startup
2+
{
3+
public void ConfigureServices(IServiceCollection services)
4+
{
5+
services.AddRazorPages();
6+
services.AddServerSideBlazor();
7+
services.AddBlazorStyled();
8+
}
9+
10+
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
11+
{
12+
if (env.IsDevelopment())
13+
{
14+
app.UseDeveloperExceptionPage();
15+
}
16+
else
17+
{
18+
app.UseExceptionHandler("/Home/Error");
19+
app.UseHsts();
20+
}
21+
22+
app.UseHttpsRedirection();
23+
app.UseStaticFiles();
24+
25+
app.UseRouting();
26+
27+
app.UseEndpoints(endpoints =>
28+
{
29+
endpoints.MapBlazorHub();
30+
endpoints.MapFallbackToPage("/_Host");
31+
});
32+
}
33+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@page "/"
2+
@namespace ServerSideSample.Pages
3+
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
4+
5+
<!DOCTYPE html>
6+
<html lang="en">
7+
<head>
8+
<meta charset="utf-8" />
9+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
10+
<title>BlazorStyled Server-Side Sample</title>
11+
<base href="~/" />
12+
@(await Html.RenderComponentAsync<BlazorStyled.ServerSideStyled>())
13+
</head>
14+
<body>
15+
<app>@(await Html.RenderComponentAsync<SampleCore.App>())</app>
16+
17+
<script src="_framework/blazor.server.js"></script>
18+
</body>
19+
</html>

docs/_content/SampleCore/keyframes1.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</Styled>
1818

1919
<Styled @bind-Classname="@example">
20-
animation: vlzl-qdd 1s ease infinite;
20+
animation: @bounce 1s ease infinite;
2121
</Styled>
2222

2323
<div class="@example">Some bouncing text!</div>

docs/_content/SampleCore/media1.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Styled @bind-Classname="@p1">
22
font-size: 30px;
3-
@@media (min-width: 420px) {
3+
@@media (min-width: 480px) {
44
font-size: 50px;
55
}
66
</Styled>

docs/_content/SampleCore/media2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
private int[] breakpoints = new int[] { 576, 768, 992, 1200 };
99

10-
protected override void OnInit()
10+
protected override void OnInitialized()
1111
{
1212
var mq = (from b in breakpoints
1313
select $"@media (min-width: {b}px)").ToArray();

docs/_content/SampleCore/media4.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<Styled @bind-Classname="@p1">
2+
font-size: 30px;
3+
</Styled>
4+
5+
<Styled Classname="@p1" MediaQuery="MediaQueries.LargerThanMobile">
6+
font-size: 50px;
7+
</Styled>
8+
9+
<p class="@p1">Some text!</p>
10+
11+
@code {
12+
private string p1;
13+
}

docs/_content/SampleCore/nested1.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Styled @bind-Classname="@nested">
22
color: turquoise;
33
& a {
4-
border-bottom: 1px solid currentColor;
5-
cursor:pointer;
4+
border-bottom: 1px solid currentColor;
5+
cursor:pointer;
66
}
77
</Styled>
88

docs/_content/SampleCore/nested2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Styled @bind-Classname="@paragraph">
22
color: turquoise;
33
header & {
4-
color: green;
4+
color: green;
55
}
66
</Styled>
77

0 commit comments

Comments
 (0)