Toggle menu
640
116
66
5.7K
Landrace.Wiki - The Landrace Cannabis Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Form:ResearchItem/styles.css: Difference between revisions

From Landrace.Wiki - The Landrace Cannabis Wiki
No edit summary
Tag: Manual revert
No edit summary
Line 1: Line 1:
/* ResearchItem form – make PageForms not look like ass */
/* Form:ResearchItem/styles.css
  Landrace.wiki — Research item entry form
  Replaces PageForms table layout with sectioned card design
  Deploy to: https://landrace.wiki/wiki/Form:ResearchItem/styles.css
*/


/* Keep the form centered and readable */
/* ===== Reset PF defaults ===== */
.mw-parser-output .formtable{
.lw-form .formtable,
  width:100%;
.lw-form table { display: none; }
   max-width:980px;
 
   margin:0 auto 18px;
/* ===== Container ===== */
   border-collapse:separate;
.lw-form {
   border-spacing:0 12px;
   max-width: 740px;
   margin: 0 auto 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
 
/* ===== Section card ===== */
.lw-section {
  background: #fff;
   border: 1px solid #e5e7eb;
   border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}
 
/* Required section header (brand green) */
.lw-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  background: #2d6a4f;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}
}


/* Each row becomes a "cardy" block */
/* Optional section header (muted) */
.mw-parser-output .formtable > tbody > tr{
.lw-section-header--optional {
   background:#fff;
   background: #f9fafb;
   border:1px solid #e5e7eb;
   border-bottom: 1px solid #e5e7eb;
   border-radius:12px;
   color: #6b7280;
   overflow:hidden;
}
 
.lw-section-header--optional .lw-section-badge {
  margin-left: auto;
  font-size: 12px;
   font-weight: 400;
  color: #9ca3af;
}
 
/* Section body */
.lw-section-body {
  padding: 20px;
}
 
/* ===== Field rows ===== */
.lw-field {
  margin-bottom: 18px;
}
.lw-field:last-child {
  margin-bottom: 0;
}
}


/* Labels */
/* Labels */
.mw-parser-output .formtable th{
.lw-label {
   width:220px;
  display: block;
   vertical-align:top;
  font-size: 13px;
   text-align:left;
  font-weight: 600;
   font-weight:700;
  color: #4b5563;
   color:#1f2937;
  margin-bottom: 6px;
   padding:14px 14px 8px;
  line-height: 1;
   border:0;
}
   white-space:nowrap;
.lw-label .lw-req {
  color: #c92a2a;
  margin-left: 2px;
}
.lw-label .lw-hint {
  font-weight: 400;
  color: #9ca3af;
  font-size: 12px;
  margin-left: 6px;
}
 
/* ===== Grid rows (side-by-side fields) ===== */
.lw-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}
.lw-row:last-child {
  margin-bottom: 0;
}
.lw-row .lw-field {
  margin-bottom: 0;
}
.lw-row--3col {
  grid-template-columns: 1fr 1fr 1fr;
}
 
/* ===== Inputs — override PF-generated elements ===== */
.lw-form input[type="text"],
.lw-form input[type="number"],
.lw-form input[type="url"],
.lw-form select,
.lw-form textarea {
   width: 100%;
   max-width: 100%;
  box-sizing: border-box;
   background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 9px 12px;
   font-size: 14px;
  line-height: 1.4;
   color: #1f2937;
   transition: border-color 0.15s ease;
}
.lw-form input:focus,
.lw-form select:focus,
.lw-form textarea:focus {
  outline: none;
   border-color: #2d6a4f;
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}
.lw-form textarea {
  resize: vertical;
  min-height: 48px;
   font-family: inherit;
}
}


/* Fields */
/* Datepicker overrides */
.mw-parser-output .formtable td{
.lw-form .ui-datepicker-input,
   padding:10px 14px 14px;
.lw-form input.hasDatepicker {
   border:0;
   width: 220px !important;
   max-width: 100%;
}
}


/* Inputs: consistent look */
/* Dropdown overrides */
.mw-parser-output .formtable input[type="text"],
.lw-form select {
.mw-parser-output .formtable input[type="number"],
   appearance: auto;
.mw-parser-output .formtable input[type="url"],
.mw-parser-output .formtable select,
.mw-parser-output .formtable textarea{
   width:100%;
  max-width:100%;
  box-sizing:border-box;
  background:#fff;
  border:1px solid #d1d5db;
  border-radius:10px;
  padding:10px 12px;
  font-size:15px;
  line-height:1.35;
}
}


/* Make textareas feel nicer */
/* Page-name autocomplete inputs from PF */
.mw-parser-output .formtable textarea{
.lw-form .pfAutocompleteInput,
   resize:vertical;
.lw-form .pfTokens {
   min-height:96px;
   width: 100%;
   box-sizing: border-box;
}
}


/* Datepicker widgets */
/* ===== Buttons ===== */
.mw-parser-output .formtable .ui-datepicker-input,
.lw-buttons {
.mw-parser-output .formtable input.hasDatepicker{
  max-width: 740px;
   width:100% !important;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.lw-buttons input[type="submit"],
.lw-buttons .mw-ui-button {
   border-radius: 8px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background-color 0.15s ease;
}
}


/* Subtle help text */
/* Save = primary green */
.mw-parser-output .mw-ui-muted{
.lw-buttons input.mw-ui-progressive,
   color:#6b7280;
.lw-buttons input[name="wpSave"] {
   font-size:12px;
  background: #2d6a4f;
   color: #fff;
   border: none;
}
.lw-buttons input.mw-ui-progressive:hover,
.lw-buttons input[name="wpSave"]:hover {
  background: #245a42;
}
}


/* Buttons row */
/* Preview = outlined */
.mw-parser-output .standardinput{
.lw-buttons input[name="wpPreview"] {
   max-width:980px;
   background: transparent;
   margin:0 auto;
   color: #4b5563;
   display:flex;
   border: 1px solid #d1d5db;
  gap:10px;
}
   flex-wrap:wrap;
.lw-buttons input[name="wpPreview"]:hover {
   background: #f3f4f6;
}
}


/* PageForms "standard input" buttons inherit MW UI classes; just improve spacing */
/* Cancel = ghost */
.mw-parser-output .standardinput .mw-ui-button,
.lw-buttons input[name="wpCancel"],
.mw-parser-output .standardinput input[type="submit"],
.lw-buttons a {
.mw-parser-output .standardinput input[type="button"]{
   background: transparent;
   border-radius:10px;
  color: #9ca3af;
   padding:9px 14px;
   border: none;
   font-weight:700;
   padding: 10px 16px;
}
}


/* Responsive: labels above fields on mobile */
/* ===== Top badge ===== */
@media (max-width: 720px){
.lw-form-badge {
   .mw-parser-output .formtable > tbody > tr{
  display: flex;
     display:block;
  align-items: center;
    padding:10px 12px;
  gap: 10px;
  margin-bottom: 20px;
}
.lw-form-badge-bar {
  width: 5px;
  height: 22px;
  background: #2d6a4f;
  border-radius: 3px;
  flex-shrink: 0;
}
.lw-form-badge-text {
  font-size: 13px;
  font-weight: 600;
  color: #2d6a4f;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
 
/* ===== Responsive ===== */
@media (max-width: 600px) {
   .lw-row,
  .lw-row--3col {
     grid-template-columns: 1fr;
   }
   }
   .mw-parser-output .formtable th,
   .lw-section-body {
  .mw-parser-output .formtable td{
     padding: 16px;
    display:block;
    width:auto;
     padding:0;
   }
   }
   .mw-parser-output .formtable th{
   .lw-form .ui-datepicker-input,
    margin:0 0 6px;
   .lw-form input.hasDatepicker {
    white-space:normal;
     width: 100% !important;
  }
   .mw-parser-output .formtable td{
     margin:0 0 8px;
   }
   }
}
}


/* SMW template output wraps results in <p> tags. Kill their default margins. */
/* ===== Dark mode (Citizen) ===== */
.portal-events-feed > p {
@media (prefers-color-scheme: dark) {
   margin: 0;
  .lw-section {
    background: #1a1a2e;
    border-color: #2a2a3e;
  }
  .lw-section-header--optional {
    background: #1e1e32;
    border-color: #2a2a3e;
  }
  .lw-section-header--optional,
  .lw-section-header--optional .lw-section-badge {
    color: #9ca3af;
  }
  .lw-label { color: #d1d5db; }
  .lw-form input[type="text"],
  .lw-form input[type="number"],
  .lw-form input[type="url"],
  .lw-form select,
  .lw-form textarea {
    background: #16162a;
    border-color: #2a2a3e;
    color: #e5e7eb;
  }
   .lw-form input:focus,
  .lw-form select:focus,
  .lw-form textarea:focus {
    border-color: #74c69d;
    box-shadow: 0 0 0 3px rgba(116, 198, 157, 0.12);
  }
}
}


/* Sometimes SMW emits empty paragraphs */
/* ===== Kill SMW paragraph noise in portal feeds ===== */
.portal-events-feed > p:empty {
.portal-events-feed > p { margin: 0; }
  display: none;
.portal-events-feed > p:empty { display: none; }
}
 
/* Make sure the actual card fills the feed width */
.portal-events-feed > p > .research-item,
.portal-events-feed > p > .research-item,
.portal-events-feed > p > .news-card,
.portal-events-feed > p > .news-card,
.portal-events-feed > p > div {
.portal-events-feed > p > div { width: 100%; }
  width: 100%;
}

Revision as of 23:08, 26 March 2026

/* Form:ResearchItem/styles.css
   Landrace.wiki — Research item entry form
   Replaces PageForms table layout with sectioned card design
   Deploy to: https://landrace.wiki/wiki/Form:ResearchItem/styles.css
*/

/* ===== Reset PF defaults ===== */
.lw-form .formtable,
.lw-form table { display: none; }

/* ===== Container ===== */
.lw-form {
  max-width: 740px;
  margin: 0 auto 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ===== Section card ===== */
.lw-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

/* Required section header (brand green) */
.lw-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  background: #2d6a4f;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

/* Optional section header (muted) */
.lw-section-header--optional {
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  color: #6b7280;
}

.lw-section-header--optional .lw-section-badge {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  color: #9ca3af;
}

/* Section body */
.lw-section-body {
  padding: 20px;
}

/* ===== Field rows ===== */
.lw-field {
  margin-bottom: 18px;
}
.lw-field:last-child {
  margin-bottom: 0;
}

/* Labels */
.lw-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 6px;
  line-height: 1;
}
.lw-label .lw-req {
  color: #c92a2a;
  margin-left: 2px;
}
.lw-label .lw-hint {
  font-weight: 400;
  color: #9ca3af;
  font-size: 12px;
  margin-left: 6px;
}

/* ===== Grid rows (side-by-side fields) ===== */
.lw-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}
.lw-row:last-child {
  margin-bottom: 0;
}
.lw-row .lw-field {
  margin-bottom: 0;
}
.lw-row--3col {
  grid-template-columns: 1fr 1fr 1fr;
}

/* ===== Inputs — override PF-generated elements ===== */
.lw-form input[type="text"],
.lw-form input[type="number"],
.lw-form input[type="url"],
.lw-form select,
.lw-form textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  line-height: 1.4;
  color: #1f2937;
  transition: border-color 0.15s ease;
}
.lw-form input:focus,
.lw-form select:focus,
.lw-form textarea:focus {
  outline: none;
  border-color: #2d6a4f;
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}
.lw-form textarea {
  resize: vertical;
  min-height: 48px;
  font-family: inherit;
}

/* Datepicker overrides */
.lw-form .ui-datepicker-input,
.lw-form input.hasDatepicker {
  width: 220px !important;
  max-width: 100%;
}

/* Dropdown overrides */
.lw-form select {
  appearance: auto;
}

/* Page-name autocomplete inputs from PF */
.lw-form .pfAutocompleteInput,
.lw-form .pfTokens {
  width: 100%;
  box-sizing: border-box;
}

/* ===== Buttons ===== */
.lw-buttons {
  max-width: 740px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.lw-buttons input[type="submit"],
.lw-buttons .mw-ui-button {
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background-color 0.15s ease;
}

/* Save = primary green */
.lw-buttons input.mw-ui-progressive,
.lw-buttons input[name="wpSave"] {
  background: #2d6a4f;
  color: #fff;
  border: none;
}
.lw-buttons input.mw-ui-progressive:hover,
.lw-buttons input[name="wpSave"]:hover {
  background: #245a42;
}

/* Preview = outlined */
.lw-buttons input[name="wpPreview"] {
  background: transparent;
  color: #4b5563;
  border: 1px solid #d1d5db;
}
.lw-buttons input[name="wpPreview"]:hover {
  background: #f3f4f6;
}

/* Cancel = ghost */
.lw-buttons input[name="wpCancel"],
.lw-buttons a {
  background: transparent;
  color: #9ca3af;
  border: none;
  padding: 10px 16px;
}

/* ===== Top badge ===== */
.lw-form-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.lw-form-badge-bar {
  width: 5px;
  height: 22px;
  background: #2d6a4f;
  border-radius: 3px;
  flex-shrink: 0;
}
.lw-form-badge-text {
  font-size: 13px;
  font-weight: 600;
  color: #2d6a4f;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .lw-row,
  .lw-row--3col {
    grid-template-columns: 1fr;
  }
  .lw-section-body {
    padding: 16px;
  }
  .lw-form .ui-datepicker-input,
  .lw-form input.hasDatepicker {
    width: 100% !important;
  }
}

/* ===== Dark mode (Citizen) ===== */
@media (prefers-color-scheme: dark) {
  .lw-section {
    background: #1a1a2e;
    border-color: #2a2a3e;
  }
  .lw-section-header--optional {
    background: #1e1e32;
    border-color: #2a2a3e;
  }
  .lw-section-header--optional,
  .lw-section-header--optional .lw-section-badge {
    color: #9ca3af;
  }
  .lw-label { color: #d1d5db; }
  .lw-form input[type="text"],
  .lw-form input[type="number"],
  .lw-form input[type="url"],
  .lw-form select,
  .lw-form textarea {
    background: #16162a;
    border-color: #2a2a3e;
    color: #e5e7eb;
  }
  .lw-form input:focus,
  .lw-form select:focus,
  .lw-form textarea:focus {
    border-color: #74c69d;
    box-shadow: 0 0 0 3px rgba(116, 198, 157, 0.12);
  }
}

/* ===== Kill SMW paragraph noise in portal feeds ===== */
.portal-events-feed > p { margin: 0; }
.portal-events-feed > p:empty { display: none; }
.portal-events-feed > p > .research-item,
.portal-events-feed > p > .news-card,
.portal-events-feed > p > div { width: 100%; }