Jump to content

User:ChaseT/vector-2022.css: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
ChaseT (talk | contribs)
No edit summary
Tag: Reverted
ChaseT (talk | contribs)
No edit summary
Tag: Reverted
Line 1: Line 1:
/* Main container adjustments */
/* Ensure the main container allows for a flex display */
.mw-body {
.mw-workspace-container {
display: flex; /* Enable flexbox */
display: flex;
justify-content: center; /* Center the content */
justify-content: center; /* Center the flex items (content and sidebar) */
flex-wrap: wrap; /* Allow items to wrap if needed on small screens */
}
}


/* Set the base width of the content to 780 pixels and center it */
/* Content area styles for a maximum width */
#content {
#content {
max-width: 780px; /* Set the max-width to the width for 65 characters */
flex: 1; /* Allow the content to be flexible */
box-sizing: border-box; /* Include padding and border in the element's width */
max-width: 780px; /* Maximum width of the content */
margin: 0 20px; /* Add some space between the content and the sidebar */
}
}


/* Left sidebar adjustments */
/* Ensure the sidebar hugs the content */
#mw-panel {
#mw-panel {
order: -1; /* Place the sidebar before the content in the flex flow */
flex: 0 0 auto; /* Do not grow, do not shrink, auto basis */
flex-shrink: 0; /* Prevent the sidebar from shrinking */
padding-right: 20px; /* Add some space between the sidebar and content */
padding-right: 10px; /* Optional padding to create space between the sidebar and content */
}
}


/* Media query for smaller screens */
/* Adjust the layout for smaller screens */
@media screen and (max-width: 780px) {
@media (max-width: 780px) { /* Adjust this value as needed */
#content {
#content {
width: 100%; /* Allow content to take full width on smaller screens */
flex-basis: auto; /* Allow content to adjust its size */
padding: 0 10px; /* Add padding to keep content from touching the edges */
margin: 0; /* Remove margin to utilize full width */
max-width: 100%; /* Allow content to fill the smaller viewport */
width: 100%; /* Use full viewport width */
}
}
}
}

Revision as of 20:36, 8 December 2023

/* Ensure the main container allows for a flex display */
.mw-workspace-container {
  display: flex;
  justify-content: center; /* Center the flex items (content and sidebar) */
  flex-wrap: wrap; /* Allow items to wrap if needed on small screens */
}

/* Set the base width of the content to 780 pixels and center it */
#content {
  flex: 1; /* Allow the content to be flexible */
  max-width: 780px; /* Maximum width of the content */
  margin: 0 20px; /* Add some space between the content and the sidebar */
}

/* Ensure the sidebar hugs the content */
#mw-panel {
  flex: 0 0 auto; /* Do not grow, do not shrink, auto basis */
  padding-right: 20px; /* Add some space between the sidebar and content */
}

/* Adjust the layout for smaller screens */
@media (max-width: 780px) { /* Adjust this value as needed */
  #content {
    flex-basis: auto; /* Allow content to adjust its size */
    margin: 0; /* Remove margin to utilize full width */
    max-width: 100%; /* Allow content to fill the smaller viewport */
    width: 100%; /* Use full viewport width */
  }
}