Module:NavboxMobile/styles.css: Difference between revisions

From Ikwipedia
No edit summary
No edit summary
 
(99 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
/* Container Styles */
.navboxMobile {
.navboxMobile {
box-sizing: border-box;
    box-sizing: border-box;
border: 1px solid #a2a9b1;
    border: 1px solid #a2a9b1;
width: 100%;
    border-collapse: collapse; /* Ensure all rows share a border */
clear: both;
    white-space: normal; /* Allow wrapping for content */
font-size: 88%;
    text-align: left;
text-align: center;
    padding: 1px;
padding: 1px;
    margin: 0 auto; /* Reduced top margin */
margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */
    background-color: #fdfdfd;
}
}


.navboxMobile .navboxMobile {
/* Ensure the title cell allows for absolute positioning */
margin-top: 0; /* No top margin for nested navboxes */
.navboxMobile-title {
}
    position: relative; /* Already set in the Lua code, but good to confirm in CSS */
 
.navboxMobile + .navboxMobile, /* TODO: remove first line after transclusions have updated */
.navboxMobile + .navboxMobile-styles + .navboxMobile {
margin-top: -1px; /* Single pixel border between adjacent navboxes */
}
}


/* Inner and Subgroup Tables */
.navboxMobile-inner,
.navboxMobile-inner,
.navboxMobile-subgroup {
.navboxMobile-subgroup {
width: 100%;
    box-sizing: border-box;
}
}


.navboxMobile-group,
.navboxMobile-title div {
.navboxMobile-title,
    text-align: center;
.navboxMobile-abovebelow {
padding: 0.25em 1em;
line-height: 1.5em;
text-align: center;
}
}


.navboxMobile-group {
.navboxMobile td, .navboxMobile th {
white-space: nowrap;
    white-space: normal; /* Prevent nowrap constraints */
/* @noflip */
    word-wrap: break-word;
text-align: right;
    overflow-wrap: anywhere;
}
}


.navboxMobile,
/* Above and Below Content */
.navboxMobile-subgroup {
.navboxMobile-abovebelow-content,
background-color: #fdfdfd;
.navboxMobile-below-content {
    padding: 0.25em 1em;
    line-height: 1.0em;
    background-color: #ddf;
    font-size: 1em;
}
}


.navboxMobile-list {
/* Group Content */
line-height: 1.5em;
.navboxMobile-group-content {
border-color: #fdfdfd; /* Must match background color */
    text-align: center; /* Centered text */
    font-size: 1em;
}
}


.navboxMobile-list-with-group {
/* Style the navbar within the title cell */
text-align: left;
.navboxMobile-navbar {
border-left-width: 2px;
    position: absolute;
border-left-style: solid;
    top: 0;
    right: 0;
    padding: 0.2em; /* Adjust as needed for alignment */
    /* Optional: Set background or text styles if necessary */
}
}


/* cell spacing for navbox cells */
/* Ensure the title text is centered across the full width */
/* Borders above 2nd, 3rd, etc. rows */
.navboxMobile-title > div {
/* TODO: figure out how to replace tr as structure;
    text-align: center;
* with div structure it should be just a matter of first-child */
    margin: 0 auto;
tr + tr > .navboxMobile-abovebelow,
tr + tr > .navboxMobile-group,
tr + tr > .navboxMobile-image,
tr + tr > .navboxMobile-list {
border-top: 2px solid #fdfdfd; /* Must match background color */
}
}


/* Title Row */
.navboxMobile-title {
.navboxMobile-title {
background-color: #ccf; /* Level 1 color */
    position: relative;
    align-items: center;
    justify-content: center;
    padding: 0.1em; /* Unified padding */
    text-align: center;
    background-color: #ccf;
    font-size: 1.0em;
    border: 2px solid white; /* Uniform 2px white border */
}
}


.navboxMobile-abovebelow,
/* Level 1: Top-level Groups */
.navboxMobile-group,
.navboxMobile-group-level1 {
.navboxMobile-subgroup .navboxMobile-title {
    background-color: #ddf;
background-color: #ddf; /* Level 2 color */
    margin: 0.05em 0; /* Symmetric top and bottom margins */
    padding: 0.08em; /* Reduced padding */
    border-top: 3px solid white;
    border-bottom: 2px solid white;
    border-left: 2px solid white;
    border-right: 2px solid white;
}
}


.navboxMobile-subgroup .navboxMobile-group,
/* Level 2 Groups */
.navboxMobile-subgroup .navboxMobile-abovebelow {
.navboxMobile-group-level2 {
background-color: #e6e6ff; /* Level 3 color */
    background-color: #e6e6ff;
    margin: 0.05em 0; /* Symmetric margins */
    padding: 0.08em; /* Reduced padding */
    border-top: 3px solid white;
    border-bottom: 2px solid white;
    border-left: 2px solid white;
    border-right: 2px solid white;
    box-shadow: inset 8px 0 #fff, inset -8px 0 #fff; /* Retained box shadow */
}
}


.navboxMobile-even {
/* Level 3 Groups */
background-color: #f7f7f7;
.navboxMobile-group-level3 {
    background-color: #e6e6ff;
    margin: 0.05em 0; /* Symmetric margins */
    padding: 0.08em; /* Reduced padding */
    border-top: 3px solid white;
    border-bottom: 2px solid white;
    border-left: 2px solid white;
    border-right: 2px solid white;
    box-shadow: inset 16px 0 #fff, inset -16px 0 #fff; /* Retained box shadow */
}
}


.navboxMobile-odd {
/* List Content */
background-color: transparent;
.navboxMobile-list-content {
    line-height: 1.2em;
    font-size: 1em;
    text-align: center;
    padding-top: 0.1em;      /* Added vertical padding */
    padding-bottom: 0.1em;  /* Added vertical padding */
    padding-left: 2px;
    padding-right: 2px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    border-top: 2px solid white;
    border-bottom: 3px solid white;
    border-left: 2px solid white;
    border-right: 2px solid white;
}
}


/* TODO: figure out how to remove reliance on td as structure */
/* Level 2 Content */
.navboxMobile .hlist td dl,
.navboxMobile-list-level2 {
.navboxMobile .hlist td ol,
    box-shadow: inset 8px 0 #fff, inset -8px 0 #fff; /* Retain shadows */
.navboxMobile .hlist td ul,
    box-sizing: border-box;
.navboxMobile td.hlist dl,
    margin: 0 auto;
.navboxMobile td.hlist ol,
    border: 2px solid white; /* Uniform 2px border */
.navboxMobile td.hlist ul {
    border-top: 2px solid white;
padding: 0.125em 0;
    border-bottom: 3px solid white;
    border-left: 2px solid white;
    border-right: 2px solid white;
    padding-top: 0.1em;      /* Added vertical padding */
    padding-bottom: 0.1em;  /* Added vertical padding */
    padding-left: 10px;
    padding-right: 10px;
}
}


/* Level 3 Content */
.navboxMobile-list-level3 {
    box-shadow: inset 16px 0 #fff, inset -16px 0 #fff; /* Retain shadows */
    box-sizing: border-box;
    margin: 0 auto;
    border-top: 2px solid white;
    border-bottom: 3px solid white;
    border-left: 2px solid white;
    border-right: 2px solid white;
    padding: 0.1em; /* This already sets vertical padding to 0.1em */
    padding-left: 18px; /* Overrides left padding */
    padding-right: 18px; /* Overrides right padding */
}
/* Responsive Adjustments */
@media all and (min-width: 720px) {
    .navboxMobile {
        /* Adjustments for larger mobile screens */
    }
}
/* Hide on Print */
@media print {
    .navboxMobile {
        display: none !important;
    }
}
/* Odd and Even Rows with Increased Specificity */
.navboxMobile-list-content.navboxMobile-even {
    background-color: #eaeaea;
}
.navboxMobile-list-content.navboxMobile-odd {
    background-color: #f4f4f4;
}
/* Adjust for odd/even rows if needed */
.navboxMobile-list-content.navboxMobile-even,
.navboxMobile-list-content.navboxMobile-odd {
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
/* Styles Container */
.navboxMobile-styles {
    /* Additional styles if necessary */
}
/* Container Padding */
.navboxMobile-container {
    padding: 1px;
}
/* Navbar Specific Styles */
.navboxMobile .navbar {
.navboxMobile .navbar {
display: block;
    display: block;
font-size: 100%;
    font-size: 100%;
}
}


.navboxMobile-title .navbar {
.navboxMobile-title .navbar {
/* @noflip */
    float: right;
float: left;
    text-align: right;
/* @noflip */
    margin-left: 0.5em;
text-align: left;
    margin-bottom: 0.1em; /* Optional: Adjust vertical alignment */
/* @noflip */
margin-right: 0.5em;
}
 
/** T367463 */
body.skin--responsive .navboxMobile-image img {
max-width: none !important;
}
}


@media print {
.navboxMobile-navbar {
body.ns-0 .navboxMobile {
    text-align: right; /* Align Navbar content to the right */
display: none !important;
    font-size: 0.85em; /* Optional: Adjust size */
}
    padding: 0.0em 0; /* Add a little padding */
    border-top: none;
}
}

Latest revision as of 06:32, 27 November 2024

/* Container Styles */
.navboxMobile {
    box-sizing: border-box;
    border: 1px solid #a2a9b1;
    border-collapse: collapse; /* Ensure all rows share a border */
    white-space: normal; /* Allow wrapping for content */
    text-align: left;
    padding: 1px;
    margin: 0 auto; /* Reduced top margin */
    background-color: #fdfdfd;
}

/* Ensure the title cell allows for absolute positioning */
.navboxMobile-title {
    position: relative;  /* Already set in the Lua code, but good to confirm in CSS */
}

/* Inner and Subgroup Tables */
.navboxMobile-inner,
.navboxMobile-subgroup {
    box-sizing: border-box;
}

.navboxMobile-title div {
    text-align: center;
}

.navboxMobile td, .navboxMobile th {
    white-space: normal; /* Prevent nowrap constraints */
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

/* Above and Below Content */
.navboxMobile-abovebelow-content,
.navboxMobile-below-content {
    padding: 0.25em 1em;
    line-height: 1.0em;
    background-color: #ddf;
    font-size: 1em;
}

/* Group Content */
.navboxMobile-group-content {
    text-align: center; /* Centered text */
    font-size: 1em;
}

/* Style the navbar within the title cell */
.navboxMobile-navbar {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.2em;  /* Adjust as needed for alignment */
    /* Optional: Set background or text styles if necessary */
}

/* Ensure the title text is centered across the full width */
.navboxMobile-title > div {
    text-align: center;
    margin: 0 auto;
}

/* Title Row */
.navboxMobile-title {
    position: relative;
    align-items: center;
    justify-content: center;
    padding: 0.1em; /* Unified padding */
    text-align: center;
    background-color: #ccf;
    font-size: 1.0em;
    border: 2px solid white; /* Uniform 2px white border */
}

/* Level 1: Top-level Groups */
.navboxMobile-group-level1 {
    background-color: #ddf;
    margin: 0.05em 0; /* Symmetric top and bottom margins */
    padding: 0.08em; /* Reduced padding */
    border-top: 3px solid white;
    border-bottom: 2px solid white;
    border-left: 2px solid white;
    border-right: 2px solid white;
}

/* Level 2 Groups */
.navboxMobile-group-level2 {
    background-color: #e6e6ff;
    margin: 0.05em 0; /* Symmetric margins */
    padding: 0.08em; /* Reduced padding */
    border-top: 3px solid white;
    border-bottom: 2px solid white;
    border-left: 2px solid white;
    border-right: 2px solid white;
    box-shadow: inset 8px 0 #fff, inset -8px 0 #fff; /* Retained box shadow */
}

/* Level 3 Groups */
.navboxMobile-group-level3 {
    background-color: #e6e6ff;
    margin: 0.05em 0; /* Symmetric margins */
    padding: 0.08em; /* Reduced padding */
    border-top: 3px solid white;
    border-bottom: 2px solid white;
    border-left: 2px solid white;
    border-right: 2px solid white;
    box-shadow: inset 16px 0 #fff, inset -16px 0 #fff; /* Retained box shadow */
}

/* List Content */
.navboxMobile-list-content {
    line-height: 1.2em;
    font-size: 1em;
    text-align: center;
    padding-top: 0.1em;      /* Added vertical padding */
    padding-bottom: 0.1em;   /* Added vertical padding */
    padding-left: 2px;
    padding-right: 2px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    border-top: 2px solid white;
    border-bottom: 3px solid white;
    border-left: 2px solid white;
    border-right: 2px solid white;
}

/* Level 2 Content */
.navboxMobile-list-level2 {
    box-shadow: inset 8px 0 #fff, inset -8px 0 #fff; /* Retain shadows */
    box-sizing: border-box;
    margin: 0 auto;
    border: 2px solid white; /* Uniform 2px border */
    border-top: 2px solid white;
    border-bottom: 3px solid white;
    border-left: 2px solid white;
    border-right: 2px solid white;
    padding-top: 0.1em;      /* Added vertical padding */
    padding-bottom: 0.1em;   /* Added vertical padding */
    padding-left: 10px;
    padding-right: 10px;
}

/* Level 3 Content */
.navboxMobile-list-level3 {
    box-shadow: inset 16px 0 #fff, inset -16px 0 #fff; /* Retain shadows */
    box-sizing: border-box;
    margin: 0 auto;
    border-top: 2px solid white;
    border-bottom: 3px solid white;
    border-left: 2px solid white;
    border-right: 2px solid white;
    padding: 0.1em; /* This already sets vertical padding to 0.1em */
    padding-left: 18px; /* Overrides left padding */
    padding-right: 18px; /* Overrides right padding */
}

/* Responsive Adjustments */
@media all and (min-width: 720px) {
    .navboxMobile {
        /* Adjustments for larger mobile screens */
    }
}

/* Hide on Print */
@media print {
    .navboxMobile {
        display: none !important;
    }
}

/* Odd and Even Rows with Increased Specificity */
.navboxMobile-list-content.navboxMobile-even {
    background-color: #eaeaea;
}

.navboxMobile-list-content.navboxMobile-odd {
    background-color: #f4f4f4;
}

/* Adjust for odd/even rows if needed */
.navboxMobile-list-content.navboxMobile-even,
.navboxMobile-list-content.navboxMobile-odd {
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

/* Styles Container */
.navboxMobile-styles {
    /* Additional styles if necessary */
}

/* Container Padding */
.navboxMobile-container {
    padding: 1px;
}

/* Navbar Specific Styles */
.navboxMobile .navbar {
    display: block;
    font-size: 100%;
}

.navboxMobile-title .navbar {
    float: right;
    text-align: right;
    margin-left: 0.5em;
    margin-bottom: 0.1em; /* Optional: Adjust vertical alignment */
}

.navboxMobile-navbar {
    text-align: right; /* Align Navbar content to the right */
    font-size: 0.85em; /* Optional: Adjust size */
    padding: 0.0em 0; /* Add a little padding */
    border-top: none;
}