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 10 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 @@ -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 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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`EditorToolbar should render normal save button 1`] = `
<DocumentFragment>
.emotion-0 {
box-shadow: 0 2px 6px 0 rgba(68, 74, 87, 0.05),0 1px 3px 0 rgba(68, 74, 87, 0.1),0 2px 54px rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 4px 0 rgba(19, 39, 48, 0.12);
position: fixed;
top: 0;
left: 0;
Expand Down Expand Up @@ -259,7 +259,7 @@ exports[`EditorToolbar should render normal save button 1`] = `
exports[`EditorToolbar should render normal save button 2`] = `
<DocumentFragment>
.emotion-0 {
box-shadow: 0 2px 6px 0 rgba(68, 74, 87, 0.05),0 1px 3px 0 rgba(68, 74, 87, 0.1),0 2px 54px rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 4px 0 rgba(19, 39, 48, 0.12);
position: fixed;
top: 0;
left: 0;
Expand Down Expand Up @@ -515,7 +515,7 @@ exports[`EditorToolbar should render normal save button 2`] = `
exports[`EditorToolbar should render with default props 1`] = `
<DocumentFragment>
.emotion-0 {
box-shadow: 0 2px 6px 0 rgba(68, 74, 87, 0.05),0 1px 3px 0 rgba(68, 74, 87, 0.1),0 2px 54px rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 4px 0 rgba(19, 39, 48, 0.12);
position: fixed;
top: 0;
left: 0;
Expand Down Expand Up @@ -730,7 +730,7 @@ exports[`EditorToolbar should render with default props 1`] = `
exports[`EditorToolbar should render with status=draft,useOpenAuthoring=false 1`] = `
<DocumentFragment>
.emotion-0 {
box-shadow: 0 2px 6px 0 rgba(68, 74, 87, 0.05),0 1px 3px 0 rgba(68, 74, 87, 0.1),0 2px 54px rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 4px 0 rgba(19, 39, 48, 0.12);
position: fixed;
top: 0;
left: 0;
Expand Down Expand Up @@ -1020,7 +1020,7 @@ exports[`EditorToolbar should render with status=draft,useOpenAuthoring=false 1`
exports[`EditorToolbar should render with status=draft,useOpenAuthoring=true 1`] = `
<DocumentFragment>
.emotion-0 {
box-shadow: 0 2px 6px 0 rgba(68, 74, 87, 0.05),0 1px 3px 0 rgba(68, 74, 87, 0.1),0 2px 54px rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 4px 0 rgba(19, 39, 48, 0.12);
position: fixed;
top: 0;
left: 0;
Expand Down Expand Up @@ -1371,7 +1371,7 @@ exports[`EditorToolbar should render with status=draft,useOpenAuthoring=true 1`]
exports[`EditorToolbar should render with status=pending_publish,useOpenAuthoring=false 1`] = `
<DocumentFragment>
.emotion-0 {
box-shadow: 0 2px 6px 0 rgba(68, 74, 87, 0.05),0 1px 3px 0 rgba(68, 74, 87, 0.1),0 2px 54px rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 4px 0 rgba(19, 39, 48, 0.12);
position: fixed;
top: 0;
left: 0;
Expand Down Expand Up @@ -1661,7 +1661,7 @@ exports[`EditorToolbar should render with status=pending_publish,useOpenAuthorin
exports[`EditorToolbar should render with status=pending_publish,useOpenAuthoring=true 1`] = `
<DocumentFragment>
.emotion-0 {
box-shadow: 0 2px 6px 0 rgba(68, 74, 87, 0.05),0 1px 3px 0 rgba(68, 74, 87, 0.1),0 2px 54px rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 4px 0 rgba(19, 39, 48, 0.12);
position: fixed;
top: 0;
left: 0;
Expand Down Expand Up @@ -1989,7 +1989,7 @@ exports[`EditorToolbar should render with status=pending_publish,useOpenAuthorin
exports[`EditorToolbar should render with status=pending_review,useOpenAuthoring=false 1`] = `
<DocumentFragment>
.emotion-0 {
box-shadow: 0 2px 6px 0 rgba(68, 74, 87, 0.05),0 1px 3px 0 rgba(68, 74, 87, 0.1),0 2px 54px rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 4px 0 rgba(19, 39, 48, 0.12);
position: fixed;
top: 0;
left: 0;
Expand Down Expand Up @@ -2279,7 +2279,7 @@ exports[`EditorToolbar should render with status=pending_review,useOpenAuthoring
exports[`EditorToolbar should render with status=pending_review,useOpenAuthoring=true 1`] = `
<DocumentFragment>
.emotion-0 {
box-shadow: 0 2px 6px 0 rgba(68, 74, 87, 0.05),0 1px 3px 0 rgba(68, 74, 87, 0.1),0 2px 54px rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 4px 0 rgba(19, 39, 48, 0.12);
position: fixed;
top: 0;
left: 0;
Expand Down Expand Up @@ -2630,7 +2630,7 @@ exports[`EditorToolbar should render with status=pending_review,useOpenAuthoring
exports[`EditorToolbar should render with workflow controls hasUnpublishedChanges=false,isNewEntry=false,isModification=false,useOpenAuthoring=false 1`] = `
<DocumentFragment>
.emotion-0 {
box-shadow: 0 2px 6px 0 rgba(68, 74, 87, 0.05),0 1px 3px 0 rgba(68, 74, 87, 0.1),0 2px 54px rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 4px 0 rgba(19, 39, 48, 0.12);
position: fixed;
top: 0;
left: 0;
Expand Down Expand Up @@ -2850,7 +2850,7 @@ exports[`EditorToolbar should render with workflow controls hasUnpublishedChange
exports[`EditorToolbar should render with workflow controls hasUnpublishedChanges=false,isNewEntry=false,isModification=false,useOpenAuthoring=true 1`] = `
<DocumentFragment>
.emotion-0 {
box-shadow: 0 2px 6px 0 rgba(68, 74, 87, 0.05),0 1px 3px 0 rgba(68, 74, 87, 0.1),0 2px 54px rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 4px 0 rgba(19, 39, 48, 0.12);
position: fixed;
top: 0;
left: 0;
Expand Down Expand Up @@ -3040,7 +3040,7 @@ exports[`EditorToolbar should render with workflow controls hasUnpublishedChange
exports[`EditorToolbar should render with workflow controls hasUnpublishedChanges=true,isNewEntry=false,isModification=false,useOpenAuthoring=false 1`] = `
<DocumentFragment>
.emotion-0 {
box-shadow: 0 2px 6px 0 rgba(68, 74, 87, 0.05),0 1px 3px 0 rgba(68, 74, 87, 0.1),0 2px 54px rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 4px 0 rgba(19, 39, 48, 0.12);
position: fixed;
top: 0;
left: 0;
Expand Down Expand Up @@ -3260,7 +3260,7 @@ exports[`EditorToolbar should render with workflow controls hasUnpublishedChange
exports[`EditorToolbar should render with workflow controls hasUnpublishedChanges=true,isNewEntry=false,isModification=false,useOpenAuthoring=true 1`] = `
<DocumentFragment>
.emotion-0 {
box-shadow: 0 2px 6px 0 rgba(68, 74, 87, 0.05),0 1px 3px 0 rgba(68, 74, 87, 0.1),0 2px 54px rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 4px 0 rgba(19, 39, 48, 0.12);
position: fixed;
top: 0;
left: 0;
Expand Down Expand Up @@ -3480,7 +3480,7 @@ exports[`EditorToolbar should render with workflow controls hasUnpublishedChange
exports[`EditorToolbar should render with workflow controls hasUnpublishedChanges=true,isNewEntry=false,isModification=true,useOpenAuthoring=false 1`] = `
<DocumentFragment>
.emotion-0 {
box-shadow: 0 2px 6px 0 rgba(68, 74, 87, 0.05),0 1px 3px 0 rgba(68, 74, 87, 0.1),0 2px 54px rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 4px 0 rgba(19, 39, 48, 0.12);
position: fixed;
top: 0;
left: 0;
Expand Down Expand Up @@ -3700,7 +3700,7 @@ exports[`EditorToolbar should render with workflow controls hasUnpublishedChange
exports[`EditorToolbar should render with workflow controls hasUnpublishedChanges=true,isNewEntry=false,isModification=true,useOpenAuthoring=true 1`] = `
<DocumentFragment>
.emotion-0 {
box-shadow: 0 2px 6px 0 rgba(68, 74, 87, 0.05),0 1px 3px 0 rgba(68, 74, 87, 0.1),0 2px 54px rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 4px 0 rgba(19, 39, 48, 0.12);
position: fixed;
top: 0;
left: 0;
Expand Down