]> git.plutz.net Git - confetti/blobdiff - templates/prescriptions.css.sh
make prescriptions colored
[confetti] / templates / prescriptions.css.sh
index cd8776022919766104447414412910a87be7c885..49db4976bcad9a89bf2c4083791a9a31943cd4bb 100755 (executable)
@@ -25,11 +25,12 @@ cat <<EOF
   display: inline-block;
   width: 96%; max-width: 460px;
   color: #800;
-  background-color: #CFF;
+  background-color: #DDD;
   margin: 1em -1% 0 2%; padding: 0;
   border: 1px solid #888;
   overflow: hidden;
 }
+form.prescription { padding-top: 1ex;}
 
 .newprescription {
   display: block;
@@ -50,26 +51,6 @@ cat <<EOF
   font-size: .75em;
 }
 
-.prescription table {display: block; width: 100%; border-collapse: collapse;}
-.prescription table tbody {width: 100%; margin: 0 auto;}
-.prescription table tr {display: table-row; width: 100%; margin: 0 auto;}
-.prescription table tr th,
-.prescription table tr td {
-  display: table-cell;
-  text-align: left;
-  padding: .25ex 1ex;
-  border-left: 1px solid red;
-}
-.prescription table tr th { padding: .25em 1ex; border-bottom: 1px solid red;}
-.prescription table tr th:nth-of-type(1),
-.prescription table tr td:nth-of-type(1) { border-left: none;}
-
-td.private  {background-color: #BFB;}
-td.selfpaid {background-color: #FFB;}
-td.compulsory.doctor {background-color: #BBF;}
-td.compulsory.dentist {background-color: #FBB;}
-td.altpractition { background-color: #FBF;}
-
 .prescription fieldset {
   display: inline-block;
   margin: 0; padding: 1ex;
@@ -137,6 +118,37 @@ td.altpractition { background-color: #FBF;}
 
 /* ======== Specific ========== */
 
+.prescription label.presctype,
+.prescription input[name=presctype] + label {
+  font-size: medium;
+  width: 22%;
+  margin: 0; margin-right: -.75ex;
+  vertical-align: bottom;
+  padding: .125em .5ex .25em 3ex;
+}
+.prescription label.presctype {
+  text-align: right;
+  font-weight: bold;
+  padding-right: 1ex;
+  padding-left: 0;
+}
+
+input[name=presctype][value\$=private]:checked  ~ fieldset,
+  input[name=presctype][value\$=private] + label,
+  .prescription.private { background-color: #CFC;}
+input[name=presctype][value\$=selfpaid]:checked  ~ fieldset,
+  input[name=presctype][value\$=selfpaid]         + label,
+  .prescription.selfpaid { background-color: #FFC;}
+input[name=presctype][value=doctor_compulsory]:checked  ~ fieldset,
+  input[name=presctype][value=doctor_compulsory]  + label,
+  .prescription.doctor.compulsory { background-color: #CFF;}
+input[name=presctype][value=dentist_compulsory]:checked  ~ fieldset,
+  input[name=presctype][value=dentist_compulsory] + label,
+  .prescription.dentist.compulsory { background-color: #FCC;}
+input[name=presctype][value^=altpractition]:checked  ~ fieldset,
+  input[name=presctype][value^=altpractition]     + label,
+  .prescription.altpractition { background-color: #FCF;}
+
 .prescription .baseinfo { width: 60%;}
 
   .baseinfo label[for=insurance],
@@ -176,7 +188,7 @@ td.altpractition { background-color: #FBF;}
 .prescription :checked + label[for=prescreviewed] {
   font-weight: normal;
   text-decoration: none;
-  background-color: #CFF;
+  background-color: transparent;
 }
 
 .prescription .catalogue { width: 100%; }