xml form generator (version from 1/28/2011)
[openemr.git] / contrib / forms / xmlformgen / xslt / style.css.xslt
blobe0a4c897f7a739ba82d53fb1775e440107431179
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!-- Generated by hand -->
3 <!--
4 Copyright (C) 2009 Rod Roark <rod@sunsetsystems.com>
6 This program is free software; you can redistribute it and/or
7 Modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
10 -->
11 <xsl:stylesheet version="1.0"
12 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
13 <xsl:output method="xml" omit-xml-declaration="yes"/>
14 <xsl:strip-space elements="*"/>
15 <xsl:template match="/">
16 <xsl:apply-templates select="form"/>
17 </xsl:template>
18 <xsl:template match="form">
19 <xsl:text disable-output-escaping="yes"><![CDATA[/* This CSS is used ONLY by the form defined in this same folder
20 * customize it as you see fit for your specific form
21 */
23 /* turn off borders for fieldsets, to make them invisible */
24 fieldset {
25 border: none;
28 /* links should be undersized */
29 .link {
30 font-size: 80%;
33 /* links should grow when clicked */
34 .link_submit {
35 font-size: 120%;
38 ]]></xsl:text>
39 <xsl:if test="/form/style='layout'">
40 <xsl:text disable-output-escaping="yes"><![CDATA[
41 /* give section objects blue borders, bold cell labels, */
42 .section {
43 border: solid;
44 border-width: 1px;
45 border-color: #0000ff;
46 margin: 0 0 0 10pt;
47 padding: 5pt;
50 /* prevent the checkboxes on our sections from bunching up. */
51 span.sectionlabel {
52 page-break-after: always;
55 /* disappear the top button bar */
56 .top_buttons {
57 display: none;
60 /* center the bottom button bar */
61 .button_bar {
62 text-align: center;
65 /* section labels should be visible, and bold in view, new, ??...*/
66 .sectionlabel {
67 font-family: sans-serif;
68 font-weight: bold;
71 /* section labels on the show page. turn them green, and bold. */
72 #show .sectionlabel {
73 color: #080;
74 font-family: sans-serif;
75 font-weight: bold;
76 font-size: 9pt;
77 padding-right: 5px;
78 height: 2em;
82 /* field labels should also be visible, and bold. */
83 .fieldlabel {
84 font-family: sans-serif;
85 font-weight: bold;
86 font-size: 9pt;
87 padding-right: 5px;
88 height: 2em;
91 /* field labels on the show page. turn them bold. */
92 #show .fieldlabel {
93 font-family: sans-serif;
94 font-weight: bold;
95 font-size: 9pt;
96 padding-right: 5px;
97 width: 25%;
100 /* Put some spacing around the edges of the form. */
101 body {
102 padding: 5pt 5pt 5pt 5pt;
105 /* Use a single font style for most objects in this page. */
106 body, td, select {
107 font-family: Arial, Helvetica, sans-serif;
110 input {
111 font-family: Arial, Helvetica, sans-serif;
114 .save {
115 margin-left: 2pt;
116 margin-right: 2pt;
119 .dontsave {
120 margin-left: 2pt;
121 margin-right: 2pt;
124 .print {
125 margin-left: 2pt;
126 margin-right: 2pt;
129 /* HACK: keep textareas at an eight point font, so they don't get too wide for our 750px 'view' and 'new' pages. */
130 textarea {
131 font-size: 8pt;
133 ]]></xsl:text>
134 </xsl:if>
135 <xsl:if test="layout">
136 <xsl:text disable-output-escaping="yes"><![CDATA[
137 /* MORE HACK: compatibility between manual forms, and layout forms */
139 /* groupname sections are section labels on the show page. turn them green, and bold. */
140 .groupname {
141 color: #080;
142 font-family: sans-serif;
143 font-weight: bold;
144 font-size: 9pt;
145 padding-right: 5px;
146 height: 2em;
149 /* as for the labels on a show page, turn them bold. */
150 .label {
151 font-family: sans-serif;
152 font-weight: bold;
153 font-size: 9pt;
156 ]]></xsl:text>
157 </xsl:if>
158 <xsl:if test="/form/style='paper'">
159 <xsl:text disable-output-escaping="yes"><![CDATA[
160 /* The title should be visibly larger on 'paper' style forms. */
161 .title {
162 font-size: 150%;
163 font-weight: bold;
166 /* make the entire form 750 pixels wide, with a paper-like background, a black border, and clear margins. */
167 #form_container {
168 border: 1px solid black;
169 background-color: #ffffcc;
170 width: 750px;
171 padding: 10px;
172 margin: 10px 0px 10px 0px;
175 /* do something similar, by making the entire form have a paper-like background, a black border, and margins, but do not set a size, so that the form may flow on paper. */
176 #print_form_container {
177 border: 1px solid black;
178 background-color: #ffffcc;
179 padding: 10px;
180 margin: 10px 0px 10px 0px;
183 .sectionlabel {
184 visibility:hidden;
187 ]]></xsl:text>
188 </xsl:if>
189 <!-- create default styles for all the div objects -->
190 <xsl:apply-templates select="div|section" mode="normal"/>
191 <xsl:apply-templates select="div|section" mode="print"/>
192 <xsl:text disable-output-escaping="yes"><![CDATA[
193 ]]></xsl:text>
194 </xsl:template>
195 <xsl:template match="div|section" mode="print"><xsl:text disable-output-escaping="yes"><![CDATA[.print_]]></xsl:text>
196 <xsl:value-of select="@name"/>
197 <xsl:text disable-output-escaping="yes"><![CDATA[ {
198 padding: 10px;
201 ]]></xsl:text>
202 </xsl:template>
203 <xsl:template match="div|section" mode="normal"><xsl:text disable-output-escaping="yes"><![CDATA[.]]></xsl:text>
204 <xsl:value-of select="@name"/>
205 <xsl:text disable-output-escaping="yes"><![CDATA[ {
206 padding: 10px;
209 ]]></xsl:text>
210 </xsl:template>
211 </xsl:stylesheet>