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

style: align Heading and Items #6988

Merged
merged 20 commits into from
Feb 1, 2024
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
Expand Up @@ -31,7 +31,7 @@ const SearchInput = styled.input`
background-color: #eff0f4;
border-radius: ${lengths.borderRadius};
font-size: 14px;
padding: 10px 6px 10px 32px;
padding: 10px 6px 10px 34px;
width: 100%;
position: relative;
z-index: ${zIndex.zIndex1};
Expand Down Expand Up @@ -62,7 +62,7 @@ const Suggestions = styled.ul`
`;

const SuggestionHeader = styled.li`
padding: 0 6px 6px 32px;
padding: 0 6px 6px 34px;
font-size: 12px;
color: ${colors.text};
`;
Expand All @@ -71,7 +71,7 @@ const SuggestionItem = styled.li(
({ isActive }) => `
color: ${isActive ? colors.active : colorsRaw.grayDark};
background-color: ${isActive ? colors.activeBackground : 'inherit'};
padding: 6px 6px 6px 32px;
padding: 6px 6px 6px 34px;
cursor: pointer;
position: relative;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ import { selectCollectionEntriesCursor } from '../../../reducers/cursors';
import Entries from './Entries';

const GroupHeading = styled.h2`
font-size: 23px;
font-size: 22px;
font-weight: 600;
line-height: 37px;
padding-inline-start: 20px;
color: ${colors.textLead};
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const ListCard = styled.li`
const ListCardLink = styled(Link)`
display: block;
max-width: 100%;
padding: 16px 22px;
padding: 16px 20px;

&:hover {
background-color: ${colors.foreground};
Expand Down Expand Up @@ -63,7 +63,7 @@ const CardHeading = styled.h2`
`;

const CardBody = styled.div`
padding: 16px 22px;
padding: 16px 20px;
height: 90px;
position: relative;
margin-bottom: ${props => props.hasImage && 0};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ const TreeNavLink = styled(NavLink)`
font-weight: 500;
align-items: center;
padding: 8px;
padding-left: ${props => props.depth * 20 + 12}px;
padding-left: ${props => props.depth * 16 + 18}px;
border-left: 2px solid #fff;

${Icon} {
margin-right: 8px;
margin-right: 4px;
flex-shrink: 0;
}

Expand Down
11 changes: 6 additions & 5 deletions packages/decap-cms-core/src/components/Collection/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@ const SidebarContainer = styled.aside`
`;

const SidebarHeading = styled.h2`
font-size: 23px;
font-size: 22px;
font-weight: 600;
line-height: 37px;
padding: 0;
margin: 18px 12px 12px;
margin: 10px 20px;
color: ${colors.textLead};
`;

const SidebarNavList = styled.ul`
margin: 16px 0 0;
margin: 12px 0 0;
list-style: none;
overflow: auto;
`;
Expand All @@ -48,12 +49,12 @@ const SidebarNavLink = styled(NavLink)`
font-size: 14px;
font-weight: 500;
align-items: center;
padding: 8px 12px;
padding: 8px 18px;
border-left: 2px solid #fff;
z-index: -1;

${Icon} {
margin-right: 8px;
margin-right: 4px;
flex-shrink: 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ exports[`NestedCollection should render connected component 1`] = `
-ms-flex-align: center;
align-items: center;
padding: 8px;
padding-left: 12px;
padding-left: 18px;
border-left: 2px solid #fff;
}

.emotion-0 mocked-icon {
margin-right: 8px;
margin-right: 4px;
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
Expand Down Expand Up @@ -100,12 +100,12 @@ exports[`NestedCollection should render connected component 1`] = `
-ms-flex-align: center;
align-items: center;
padding: 8px;
padding-left: 32px;
padding-left: 34px;
border-left: 2px solid #fff;
}

.emotion-0 mocked-icon {
margin-right: 8px;
margin-right: 4px;
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
Expand Down Expand Up @@ -169,12 +169,12 @@ exports[`NestedCollection should render connected component 1`] = `
-ms-flex-align: center;
align-items: center;
padding: 8px;
padding-left: 32px;
padding-left: 34px;
border-left: 2px solid #fff;
}

.emotion-0 mocked-icon {
margin-right: 8px;
margin-right: 4px;
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
Expand Down Expand Up @@ -243,12 +243,12 @@ exports[`NestedCollection should render correctly with nested entries 1`] = `
-ms-flex-align: center;
align-items: center;
padding: 8px;
padding-left: 12px;
padding-left: 18px;
border-left: 2px solid #fff;
}

.emotion-0 mocked-icon {
margin-right: 8px;
margin-right: 4px;
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
Expand Down Expand Up @@ -329,12 +329,12 @@ exports[`NestedCollection should render correctly with nested entries 1`] = `
-ms-flex-align: center;
align-items: center;
padding: 8px;
padding-left: 32px;
padding-left: 34px;
border-left: 2px solid #fff;
}

.emotion-0 mocked-icon {
margin-right: 8px;
margin-right: 4px;
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
Expand Down Expand Up @@ -398,12 +398,12 @@ exports[`NestedCollection should render correctly with nested entries 1`] = `
-ms-flex-align: center;
align-items: center;
padding: 8px;
padding-left: 32px;
padding-left: 34px;
border-left: 2px solid #fff;
}

.emotion-0 mocked-icon {
margin-right: 8px;
margin-right: 4px;
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
Expand Down Expand Up @@ -472,12 +472,12 @@ exports[`NestedCollection should render correctly with no entries 1`] = `
-ms-flex-align: center;
align-items: center;
padding: 8px;
padding-left: 12px;
padding-left: 18px;
border-left: 2px solid #fff;
}

.emotion-0 mocked-icon {
margin-right: 8px;
margin-right: 4px;
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ exports[`Sidebar should render nested collection with filterTerm 1`] = `
}

.emotion-2 {
font-size: 23px;
font-size: 22px;
font-weight: 600;
line-height: 37px;
padding: 0;
margin: 18px 12px 12px;
margin: 10px 20px;
color: #313d3e;
}

.emotion-4 {
margin: 16px 0 0;
margin: 12px 0 0;
list-style: none;
overflow: auto;
}
Expand Down Expand Up @@ -80,15 +81,16 @@ exports[`Sidebar should render sidebar with a nested collection 1`] = `
}

.emotion-2 {
font-size: 23px;
font-size: 22px;
font-weight: 600;
line-height: 37px;
padding: 0;
margin: 18px 12px 12px;
margin: 10px 20px;
color: #313d3e;
}

.emotion-4 {
margin: 16px 0 0;
margin: 12px 0 0;
list-style: none;
overflow: auto;
}
Expand Down Expand Up @@ -139,15 +141,16 @@ exports[`Sidebar should render sidebar with a simple collection 1`] = `
}

.emotion-2 {
font-size: 23px;
font-size: 22px;
font-weight: 600;
line-height: 37px;
padding: 0;
margin: 18px 12px 12px;
margin: 10px 20px;
color: #313d3e;
}

.emotion-4 {
margin: 16px 0 0;
margin: 12px 0 0;
list-style: none;
overflow: auto;
}
Expand All @@ -163,13 +166,13 @@ exports[`Sidebar should render sidebar with a simple collection 1`] = `
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
padding: 8px 12px;
padding: 8px 18px;
border-left: 2px solid #fff;
z-index: -1;
}

.emotion-6 mocked-icon {
margin-right: 8px;
margin-right: 4px;
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
Expand Down Expand Up @@ -235,15 +238,16 @@ exports[`Sidebar should render sidebar without search 1`] = `
}

.emotion-2 {
font-size: 23px;
font-size: 22px;
font-weight: 600;
line-height: 37px;
padding: 0;
margin: 18px 12px 12px;
margin: 10px 20px;
color: #313d3e;
}

.emotion-4 {
margin: 16px 0 0;
margin: 12px 0 0;
list-style: none;
overflow: auto;
}
Expand All @@ -259,13 +263,13 @@ exports[`Sidebar should render sidebar without search 1`] = `
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
padding: 8px 12px;
padding: 8px 18px;
border-left: 2px solid #fff;
z-index: -1;
}

.emotion-6 mocked-icon {
margin-right: 8px;
margin-right: 4px;
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
Expand Down
Loading