styling CellTable Row depending on it's value - css

I need to change the color of the row in CellTble depending on its value, I'm setting the style by (cellTable.css) file using Interface CellTable.Style .
I tried the code :
AttendanceTable.setRowStyles(new RowStyles<AttendanceRecord>(){
#Override
public String getStyleNames(AttendanceRecord row, int rowIndex) {
if(row.getName().equals("-"))
return"blueText";
else
return"normalText";
}
});
and both (blueText , normalText)are defined in my project.css file but it don't see them.
any suggestions? ... thanks in advance.
my cellTable.css file is as follow:
/**
* table styles
*/
.cellTableCell {
border:0px;
border-right: 1px solid #FFFFFF;
border-bottom: 1px solid #FFFFFF;
height: 37px;
color:#7f7f7f;
font-size: 12px;
font-family: sans-serif;
padding-left: 10px;
}
.cellTableHeader {
color: #FFFFFF;
border:0px;
border-right: 1px solid #FFFFFF;
border-bottom: 5px solid #FFFFFF;
background-color: #6AA0BF;
text-align: center;
font-size:11px;
text-shadow: none;
overflow: hidden;
height: 50px;
font-family: sans-serif;
}
.cellTableEvenRow {
background: #C8CED6;
text-align: center;
}
.cellTableOddRow {
background: #DFE7F2;
text-align: center;
}
.cellTableHoveredRow {
background: #D0D8E8 ;
text-align: center;
}
.cellTableSelectedRow {
background: #ea9706;
text-align: center;
}
.cellTableSelectedRowCell {
color: white ;
}

Related

React-calendar css overriding isn't applying to the calendar

I am using NextJS and making a calendar component. Issue is I am trying to override the Calendar.css file in the module that it says you can override to make custom styles. I have overridden it my own styles but they aren't taking effect. Then I tried deleting the css file content entirely but it didn't even change the format. It wasn't until I comment out the import css that the style goes back to normal. Is this a React 18/Nextjs bug? I tried it in chrome and firefox and got the same results.
The first picture is a screenshot of what is displayed after applying the default css styling in the module. The second picture is what I would like it to look like after overriding the default css file.
.react-calendar {
width: 350px;
max-width: 100%;
background: white;
border: 1px solid #a0a096;
font-family: Arial, Helvetica, sans-serif;
line-height: 1.125em;
}
.react-calendar--doubleView {
width: 700px;
}
.react-calendar--doubleView .react-calendar__viewContainer {
display: flex;
margin: -0.5em;
}
.react-calendar--doubleView .react-calendar__viewContainer > * {
width: 50%;
margin: 0.5em;
}
.react-calendar,
.react-calendar *,
.react-calendar *:before,
.react-calendar *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.react-calendar button {
margin: 0;
border: 0;
outline: none;
}
.react-calendar button:enabled:hover {
cursor: pointer;
}
.react-calendar__navigation {
display: flex;
height: 44px;
margin-bottom: 1em;
}
.react-calendar__navigation button {
min-width: 44px;
background: none;
}
.react-calendar__navigation button:disabled {
background-color: #f0f0f0;
}
.react-calendar__navigation button:enabled:hover,
.react-calendar__navigation button:enabled:focus {
background-color: #e6e6e6;
}
.react-calendar__month-view__weekdays {
text-align: center;
text-transform: uppercase;
font-weight: bold;
font-size: 0.75em;
}
.react-calendar__month-view__weekdays__weekday {
padding: 0.5em;
}
.react-calendar__month-view__weekNumbers .react-calendar__tile {
display: flex;
align-items: center;
justify-content: center;
font-size: 0.75em;
font-weight: bold;
}
.react-calendar__month-view__days__day--weekend {
color: #d10000;
}
.react-calendar__month-view__days__day--neighboringMonth {
color: #757575;
}
.react-calendar__year-view .react-calendar__tile,
.react-calendar__decade-view .react-calendar__tile,
.react-calendar__century-view .react-calendar__tile {
padding: 2em 0.5em;
}
.react-calendar__tile {
max-width: 100%;
padding: 10px 6.6667px;
background: none;
text-align: center;
line-height: 16px;
}
.react-calendar__tile:disabled {
background-color: #f0f0f0;
}
.react-calendar__tile:enabled:hover,
.react-calendar__tile:enabled:focus {
background-color: #e6e6e6;
}
.react-calendar__tile--now {
background: #ffff76;
}
.react-calendar__tile--now:enabled:hover,
.react-calendar__tile--now:enabled:focus {
background: #ffffa9;
}
.react-calendar__tile--hasActive {
background: #76baff;
}
.react-calendar__tile--hasActive:enabled:hover,
.react-calendar__tile--hasActive:enabled:focus {
background: #a9d4ff;
}
.react-calendar__tile--active {
background: #006edc;
color: white;
}
.react-calendar__tile--active:enabled:hover,
.react-calendar__tile--active:enabled:focus {
background: #1087ff;
}
.react-calendar--selectRange .react-calendar__tile--hover {
background-color: #e6e6e6;
}
This is the default css style.
.react-calendar {
width: 400px;
max-width: 100%;
background-color: #fff;
color: #222;
border-radius: 8px;
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
font-family: Arial, Helvetica, sans-serif;
line-height: 1.125em;
}
.react-calendar__navigation button {
color: #6f48eb;
min-width: 44px;
background: none;
font-size: 16px;
margin-top: 8px;
}
.react-calendar__navigation button:enabled:hover,
.react-calendar__navigation button:enabled:focus {
background-color: #f8f8fa;
}
.react-calendar__navigation button[disabled] {
background-color: #f0f0f0;
}
abbr[title] {
text-decoration: none;
}
/* .react-calendar__month-view__days__day--weekend {
color: #d10000;
} */
.react-calendar__tile:enabled:hover,
.react-calendar__tile:enabled:focus {
background: #f8f8fa;
color: #6f48eb;
border-radius: 6px;
}
.react-calendar__tile--now {
background: #6f48eb33;
border-radius: 6px;
font-weight: bold;
color: #6f48eb;
}
.react-calendar__tile--now:enabled:hover,
.react-calendar__tile--now:enabled:focus {
background: #6f48eb33;
border-radius: 6px;
font-weight: bold;
color: #6f48eb;
}
.react-calendar__tile--hasActive:enabled:hover,
.react-calendar__tile--hasActive:enabled:focus {
background: #f8f8fa;
}
.react-calendar__tile--active {
background: #6f48eb;
border-radius: 6px;
font-weight: bold;
color: white;
}
.react-calendar__tile--active:enabled:hover,
.react-calendar__tile--active:enabled:focus {
background: #6f48eb;
color: white;
}
.react-calendar--selectRange .react-calendar__tile--hover {
background-color: #f8f8fa;
}
.react-calendar__tile--range {
background: #f8f8fa;
color: #6f48eb;
border-radius: 0;
}
.react-calendar__tile--rangeStart {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-top-left-radius: 6px;
border-bottom-left-radius: 6px;
background: #6f48eb;
color: white;
}
.react-calendar__tile--rangeEnd {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
background: #6f48eb;
color: white;
}
This is the custom styling I am trying to add. I can also completely delete all of Calendar.css file and leave it blank but the first picture shown above^^ will still show like that
I don't know if it makes a difference but I am also using tailwind css with this program.
// App.js
import { useState } from "react";
import Calendar from "react-calendar";
import "react-calendar/dist/Calendar.css";
function cal() {
const [date, setDate] = useState(new Date());
return (
<div className="app">
<h1 className="text-center">React Calendar</h1>
<div className="calendar-container">
<Calendar onChange={setDate} value={date} />
</div>
<p className="text-center">
<span className="bold">Selected Date:</span> {date.toDateString()}
</p>
</div>
);
}
export default cal;
This is where I am trying to create the calendar
You can add !important to the properties to force the overwrite, for example:
.react-calendar__tile--rangeEnd {
border-top-left-radius: 0 !important;
border-bottom-left-radius: 0 !important;
border-top-right-radius: 6px !important;
border-bottom-right-radius: 6px !important;
background: #6f48eb !important;
color: white !important;
}

Configure CSS to add table of contents in side bar?

Disclaimer - I know very little about CSS.
I'm interesting in using jemdoc's CSS (https://jemdoc.jaboc.net/jemdoc.css) with HTML5 exported from emacs org-mode. However I believe emacs org-mode exports a "table-of-contents" rather than a "menu" (which is generated from a separate file with jemdoc), but I would like it if the table of contents could be displayed in the sidebar like the menu. Can this be modified to accept a table of contents? I believe this is the relevant part of the jemdoc CSS.
table#tlayout {
border: none;
border-collapse: separate;
background: white;
}
body {
background: white;
font-family: Georgia, serif;
padding-bottom: 8px;
margin: 0;
}
#layout-menu {
background: #f6f6f6;
border: 1px solid #dddddd;
padding-top: 0.5em;
padding-left: 8px;
padding-right: 8px;
font-size: 1.0em;
width: auto;
white-space: nowrap;
text-align: left;
vertical-align: top;
}
#layout-menu td {
background: #f4f4f4;
vertical-align: top;
}
#layout-content {
padding-top: 0.0em;
padding-left: 1.0em;
padding-right: 1.0em;
border: none;
background: white;
text-align: left;
vertical-align: top;
}
#layout-menu a {
line-height: 1.5em;
margin-left: 0.5em;
}
tt {
background: #ffffdd;
}
pre, tt {
font-size: 90%;
font-family: monaco, monospace;
}
a, a > tt {
color: #224b8d;
text-decoration: none;
}
a:hover {
border-bottom: 1px gray dotted;
}
#layout-menu a.current:link, #layout-menu a.current:visited {
color: #022b6d;
border-bottom: 1px gray solid;
}
#layout-menu a:link, #layout-menu a:visited, #layout-menu a:hover {
color: #527bbd;
text-decoration: none;
}
#layout-menu a:hover {
text-decoration: none;
}
div.menu-category {
border-bottom: 1px solid gray;
margin-top: 0.8em;
padding-top: 0.2em;
padding-bottom: 0.1em;
font-weight: bold;
}
div.menu-item {
padding-left: 16px;
text-indent: -16px;
}
Currently I use something like this to display my org-mode at the top of the HTML5 page (which I also copied from another CSS file).
#table-of-contents {
display: table;
width: 350px;
border: 1px solid #aaa;
margin-top: 3ex;
padding: 10px 10px 10px 0px;
}
#table-of-contents h2 {
border: 0;
text-align: center;
list-style-type: none;
}

NReco PdfGenerator character or letter spacing

I am using Nreco PdfGenerator to generate pdf from HTML. Everything is fine but characters are so close to each other and it is not easy to read.
Is there any way to fix this issue?
HTML version
PDF version
This is my CSS
<style type="text/css" media="screen">
body { line-height: 18px; font-family: Arial, sans-serif; font-size: 12px; background: #fff; text-rendering: optimizeSpeed; }
.topButton { width: 880px; margin: 0 auto; padding: 10px; background: #fff; border-bottom: 2px solid #007182; }
.mainTable { width: 880px; margin: 0 auto; padding: 10px; background: #fff; /*border: 1px solid red;*/ }
.just { text-align: justify; }
.detailItinerary { width: 100%; border: 10px solid red; }
.dailyTitle { color: #4C9897; margin-top: 10px; display: block; font-size: 12px; }
.serviceRowsWithBorder { width: 100%; border-bottom: 1px solid #007182; padding: 10px 0; }
.serviceRowsWithoutBorder { width: 100%; padding: 10px 0; }
.topLink { text-decoration: none; color: #C74E1B; }
</style>
<style media="print">
.topButton { display: none; }
#page { size: auto; margin: 7mm; }
body { background: #fff; margin: 0; font-family: Arial, sans-serif; font-size: 12px; text-rendering: optimizeSpeed; }
.mainTable { width: 100%; margin: 0 auto; padding: 10px; background: #fff; /*border: 1px solid red;*/ }
.just { text-align: justify; }
.dailyTitle { color: #4C9897; margin-top: 10px; display: block; font-size: 12px; }
.serviceRowsWithBorder { width: 100%; border-bottom: 1px solid #007182; padding: 10px 0; }
.serviceRowsWithoutBorder { width: 100%; padding: 10px 0; }
</style>
Setting the 'CustomWkHtmlArgs' property with the "--dpi 300" option fixed this problem for me, e.g.
return new HtmlToPdfConverter
{
Orientation = PageOrientation.Portrait,
PageHeaderHtml = "<br/>",
PageFooterHtml = "<div style=\"font-family: Arial;\">Page: <span class=\"page\"></span> of <span class=\"topage\"></span></div>",
CustomWkHtmlArgs = "--dpi 300",
};
This is very vaguely explained on the NReco PDF website, but without it actually explaining how to set the property.

How to change font size?

How to change font size for my SMF forum theme? I see percentages which change only some parts of the text, can't find where to change post font, thread font etc...
Please just point me in the right direction, also what does xx%/yy% mean in regards to the font?
/* SMFSimple.com Theme Style */
body
{
background: url(../images/theme/bg.png) #f8f8f8;
font: 78%/130% 'Oxygen',sans-serif;
padding: 0px;
}
a:link, a:visited {color: #4D4D4D;}
a.new_win:link, a.new_win:visited {color: #4D4D4D;}
input, button, select, textarea
{
font: 95%/115% 'Oxygen',sans-serif;
color: #000;
background: #fff;
border: 1px solid #7f9db9;
}
textarea
{
font: 100%/130% 'Oxygen',sans-serif;
}
.smalltext, tr.smalltext th
{
font-size: 0.85em;
font-family: 'Oxygen',sans-serif;
}
.middletext
{
font-size: 0.9em;
line-height: 1em;
font-family: 'Oxygen',sans-serif;
}
.normaltext
{
font-size: 1em;
line-height: 1.2em;
}
.largetext
{
font-size: 1.4em;
}
code.bbc_code
{
display: block;
font-family: 'Oxygen',sans-serif;
font-size: x-small;
background: #eef;
border-top: 2px solid #999;
border-bottom: 2px solid #999;
line-height: 1.5em;
padding: 3px 1em;
overflow: auto;
white-space: nowrap;
/* Show a scrollbar after about 24 lines. */
max-height: 24em;
}
.bbc_tt
{
font-family: 'Oxygen',sans-serif;
}
#font-face {
font-family: 'Oxygen';
font-style: normal;
font-weight: 400;
src: local('Oxygen'), local('OpenSans'), url(../fonttheme.woff) format('woff');
}
#full_header
{
margin: 0 auto;
min-width: 764px;
max-width: 2300px;
}
#bar_social
{
background: rgba(255, 255, 255, 0.7);
height: 50px;
border: 1px solid #e8e8e8;
}
.ss_content_header
{
clear: both;
overflow: hidden;
width: 100%;
padding: 20px 0px;
padding: 20px 0px;
}
.ss_logo
{
width: 48%;
float: left;
margin-top: 10px;
padding-left: 20px;
}
.ss_user_area
{
width: 48%;
float: left;
margin-top: 15px;
}
.table_user
{
border-radius: 5px;
background: rgba(00, 00, 00, 0.7);
padding: 0px 10px;
font-size: 12px;
border: 1px solid #333;
text-shadow: 0px 1px 1px #666;
}
.user
{
color: #f4f4f4;
}
.user a
{
color: #F9BC06;
}
.ss_avatar_pad
{
padding-right: 15px;
}
This line:
font: 78%/130% 'Oxygen',sans-serif;
breaks down to:
font-size: 78%;
line-height: 130%;
font-family: 'Oxygen', sans-serif;
If no font size is given explicitly, the browser's default value is used, which is actually 16px.

Ajax calendar extender cuts off at bottom

I used Ajax calendar extender with my custom css classes. These are applied well but problem is that when any calendar which is at bottom of page opens, it get cut at bottom due to restricted boundary of form. How can I overlap on the form boundary and can get full view of Calendar.
In above image blue line at bottom is the form border. Also below are the classes that I used to styling the calendar
.calendarContainer
table th
{
padding: 0!important;
margin: 0!important;
border: 0!important;
}
.calendarContainer
table td
{
padding: 0!important;
margin: 0!important;
border: 0!important;
}
.calendarContainer .ajax__calendar_container {
background-color: #DEF1F4;
border: solid 1px #A1DCF2;
z-index : 10000 ;
}
.calendarContainer .ajax__calendar_header
{
background-color: #ffffff;
margin-bottom: 4px;
}
.calendarContainer .ajax__calendar_title,
.calendarContainer .ajax__calendar_next,
.calendarContainer .ajax__calendar_prev {
color: #004080;
padding-top: 3px;
}
.calendarContainer .ajax__calendar_body {
background-color: #ffffff;
border: solid 1px #A1DCF2;
z-index : 10000 ;
}
.calendarContainer .ajax__calendar_dayname {
text-align:center;
margin-bottom: 4px;
margin-top: 2px;
color: #004080;
}
.calendarContainer .ajax__calendar_day {
color: #004080;
text-align:center;
}
What could be the appropriate css?
Try this,
/* css for Ajax calandar control. */
.Calendar td
{
text-align: left;
padding: 0px;
height: 19px;
font-family:Verdana, Geneva, sans-serif;
font-size:12px;
color:#333;
}
.Calendar .ajax__calendar_container
{
background-color: white;
border: solid 1px #cccccc;
}
.Calendar .ajax__calendar_header
{
background-color: #ffffff;
margin-bottom: 4px;
}
.Calendar .ajax__calendar_title, .Calendar .ajax__calendar_next, .Calendar .ajax__calendar_prev
{
color: black;
padding-top: 3px;
}
.Calendar .ajax__calendar_body
{
background-color: white;
border: solid 1px #cccccc;
}
.Calendar .ajax__calendar_dayname
{
text-align: center;
font-weight: bold;
margin-bottom: 4px;
margin-top: 2px;
}
.Calendar .ajax__calendar_day
{
text-align: center;
}
.Calendar .ajax__calendar_hover .ajax__calendar_day, .Calendar .ajax__calendar_hover .ajax__calendar_month, .Calendar .ajax__calendar_hover .ajax__calendar_year, .Calendar .ajax__calendar_active
{
color: #004080;
font-weight: bold;
background-color: silver;
}
.Calendar .ajax__calendar_today
{
font-weight: bold;
}
.Calendar .ajax__calendar_other
{
color: #bbbbbb;
}
.Calendar .ajax__calendar_hover .ajax__calendar_today, .Calendar .ajax__calendar_hover .ajax__calendar_title
{
color: Blue;
}
/* End */
aspx:
<cc1:CalendarExtender ID="cetbDate" runat="server" Enabled="True" Format="dd/MM/yyyy"
TargetControlID="tbFromDate" PopupPosition="TopLeft" CssClass="Calendar">
</cc1:CalendarExtender>

Resources