Skip to content

Commit e8e154c

Browse files
committed
Initial refactor of Scoped CSS
1 parent 12a108b commit e8e154c

File tree

16 files changed

+336
-326
lines changed

16 files changed

+336
-326
lines changed

src/LinkDotNet.Blog.Web/Features/AboutMe/Components/Profile.razor

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
@inject IRepository<ProfileInformationEntry> Repository
66
@inject ISortOrderCalculator SortOrderCalculator
7-
<div class="profile-card">
8-
<div class="profile-name">
7+
<div class="aboutme-profile-card">
8+
<div class="aboutme-profile-name">
99
<span>@ProfileInformation.Name</span>
1010
<br/>
1111
<span>@ProfileInformation.Heading</span>
1212
</div>
13-
<div class="profile-image">
13+
<div class="aboutme-profile-image">
1414
<img src="@ProfileInformation.ProfilePictureUrl" alt="Profile Picture" />
1515
</div>
16-
<ul class="profile-keypoints"
16+
<ul class="aboutme-profile-keypoints"
1717
ondragover="event.preventDefault();">
1818
@foreach (var entry in profileInformationEntries)
1919
{
Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1 @@
1-
.profile-card {
2-
display: inline-block;
3-
box-shadow: 0 3px 7px -1px rgba(0, 0, 0, 0.1);
4-
width: 100%;
5-
border-radius: 8px;
6-
}
7-
8-
.profile-name {
9-
padding: 20px;
10-
font-size: 1.25em;
11-
line-height: 1.5em;
12-
}
13-
14-
.profile-name:first-child {
15-
background: var(--tag-background);
16-
}
17-
18-
.profile-image {
19-
padding: 30px;
20-
background: var(--tag-background);
21-
}
22-
23-
.profile-image img {
24-
width: 100%;
25-
margin: auto;
26-
border-radius: 50vw;
27-
display: block;
28-
}
29-
30-
.profile-keypoints {
31-
background-color: var(--tag-background);
32-
padding-top: 10px;
33-
padding-left: 2.5em;
34-
padding-right: 1.5em;
35-
list-style: none;
36-
margin-bottom: 0;
37-
}
38-
39-
.profile-keypoints li {
40-
padding-bottom: 0.6em;
41-
letter-spacing: 0.05em;
42-
}
43-
44-
/* As the MarkupComponent is a base class we have to use deep */
45-
::deep .profile-keypoints li p {
46-
display: inline;
47-
}
48-
49-
.item-draggable {
50-
cursor: grab;
51-
}
1+


src/LinkDotNet.Blog.Web/Features/AboutMe/Components/Skill/SkillTable.razor

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<AddSkillDialog @ref="AddSkillDialog" SkillAdded="@AddSkill"></AddSkillDialog>
1010
}
1111
</div>
12-
<div class="table-container">
13-
<table class="skill-table" id="skill-table">
12+
<div class="aboutme-table-container">
13+
<table class="aboutme-skill-table" id="aboutme-skill-table">
1414
<tbody>
1515
<tr>
1616
<th>Capability</th>
@@ -51,7 +51,7 @@
5151
</table>
5252
@if (ShowAdminActions)
5353
{
54-
<small for="skill-table">You can drag and drop your skills from one proficiency to another</small>
54+
<small for="aboutme-skill-table">You can drag and drop your skills from one proficiency to another</small>
5555
}
5656
</div>
5757
@code {
Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +0,0 @@
1-
.table-container {
2-
overflow-x: auto;
3-
}
4-
5-
.skill-table {
6-
margin-top: 20px;
7-
width: 100%;
8-
}
9-
10-
.skill-table td:first-of-type {
11-
width:10%
12-
}
13-
14-
.skill-table td {
15-
width: 30%;
16-
border-top: 1px var(--bs-light) solid;
17-
vertical-align: top;
18-
min-width: 100px;
19-
}
20-
21-
.skill-table td div {
22-
display: inline-block;
23-
margin-right: 8px;
24-
margin-top: 12px;
25-
margin-bottom: 12px;
26-
}

src/LinkDotNet.Blog.Web/Features/AboutMe/Components/Skill/SkillTag.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@using LinkDotNet.Blog.Domain
2-
<span class="skill-tag">
2+
<span class="aboutme-skill-tag">
33
@if (!string.IsNullOrEmpty(Skill.IconUrl))
44
{
55
<img src="@Skill.IconUrl" alt="icon" max-width="48px"/>
Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +0,0 @@
1-
.skill-tag {
2-
padding: 8px;
3-
border-radius: 5px;
4-
background-color: var(--tag-background);
5-
display: inline-block;
6-
white-space: nowrap;
7-
overflow: hidden;
8-
text-overflow: ellipsis;
9-
}
10-
11-
.skill-tag img {
12-
padding-right: 12px;
13-
width: 36px;
14-
}
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +0,0 @@
1-
.nav>.nav-item>button {
2-
border: 0;
3-
background: transparent !important;
4-
color: var(--bs-body-color) !important;
5-
}

src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/CreateNewBlogPost.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
@bind-Value="@model.Content"></MarkdownTextArea>
3333
<ValidationMessage For="() => model.Content"></ValidationMessage>
3434

35-
<div class="btn-group position-absolute bottom-0 end-0 m-5 extra-buttons">
35+
<div class="btn-group position-absolute bottom-0 end-0 m-5 admin-extra-buttons">
3636
<button class="btn btn-primary btn-outlined btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
3737
More
3838
</button>
Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +0,0 @@
1-
.extra-buttons {
2-
opacity: 0.25;
3-
}
4-
5-
.extra-buttons:hover {
6-
opacity: 1;
7-
}
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +0,0 @@
1-
.actions {
2-
float:right;
3-
}
4-
5-
.actions * {
6-
margin-left: 5px;
7-
margin-top: 25px;
8-
width: 125px;
9-
}

0 commit comments

Comments
 (0)