I would like to set the sheet-wide default font size set to 8pt, instead of the default 11pt. Is there a way to set a global style using the Axlsx gem (implemented with Axlsx-Rails)?
I've looked at the axlsx_styler gem, which looks like it solves a few other styling limitations that are present in Axlsx out-the-box, however, it still doesn't seem to cater for global styles.
I realize of course that an option would be to use Axlsx's style_name = wb.styles.add_style(...) to set up a style and call it on every single row the sheet generates, but give there are other once-off styles that also need drizzling around the sheet, that doesn't seem like a great solution.
Are there any other ideas on how to achieve the setting of global styles on an Axlsx sheet?
Related
I want a page break after every chapter and every section.
We can get page breaks in restructured text, anywhere we want using:
.. raw::pdf
PageBreak
The good thing is this works both with rst2pdf as well as rinohtype. However, the advantage with rinohtype is we can achieve the same without adding the above code manually after every section using stylesheets.
I am just not sure how we can do that using stylesheets, can anyone help?
Using a custom style sheet, you can force page breaks before arbitrary sections by setting the page_break style attribute (in the upcoming 0.5.0 release, page_break can be set on any flowable, not just sections).
To insert a page break at an arbitrary point:
Indicate where to insert the page break:
or using the class directive (or rst-class in Sphinx) before a body element, or
assign a class to a directive by setting the :class: attribute
Define a style with a selector matching the class name. This is achieved by means of the has_class selector attribute.
The page break will be inserted before the corresponding element.
Here's an example, assuming you're using rinohtype 0.4.3.dev1 or later:
Your reStructuredText file:
.. image:: images/screenshot.png
:class: page-break
A regular paragraph.
.. rst-class:: page-break
This paragraph will trigger a page break.
Your custom style sheet:
[page-break-paragraph : Paragraph(has_class="page-break")]
base = default
page_break = any
[page-break-image : Image(has_class="page_break")]
base = image
page_break = any
Note that the newly defined styles will also determine the styling of the page-breaking element. To style them like other elements in the document, you need to set their base style to the default style. Refer to the style log to figure out which styles these are.
See issue #186 for some more details about page breaks in reStructuredText and rinohtype.
I have a question about paginationElement in Tabulator.
As per tabulator documentation, i created a DIV and used paginationElement in Table setup to render the paginator in the DIV. Well, it works. But with a drawback, no styling works, no colors, no highlighting of current page. So it is kinda inconvenient.
Is there a way to resolve this?
Otherwise, i am really happy with Tabulator! Thank you for the great work!
Cheers
You might have to style the pagination footer by css as the location of it has been changed by paginationElement.
This is because all of the table styling is based around the pagination element being inside the table.
Moving it outside the table will mean you will need to apply the styles yourself. The classes that denote that you are on the current page etc will still be applied, you just need to tell the browser how to style them.
The Styling Documentation contains more information on the classes used by tabulator and how to style the table
Setup:
I am using Orchard CMS 1.6.
I have a site where I need to be able to set the background color of the whole page. Ie, I need to style the body tag.
I could use the LayoutSelector module and have distinct layouts. However, the only difference in each layout is that the background-color rule for the body tag is different. So it seems a very un-dry way of doing things.
I can't find any way to make Vandelay.Classy add a distinct id or class to the body tag (it adds, as I understand it) an id or a class to the outer tag of a content type. In my case, that isn't the body tag.
So that is no good, I really do need to customize the body tag.
How to do this?
Note:
I need 3 different background colors. I also have a two column layout and a three column layout. [I use (a modified version of) the layoutSelector module to achieve this.] So to have 3 different colors of background, and I used layouts to achieve this, I would need 6 different layouts: TOTAL overkill.
There must be a better way...
From any cshtml file, you should be able to access the Layout shape. From pretty much anywhere else, you can still get to the Layout shape through WorkContextAccessor. Once you have a reference to the Layout shape, you can do Layout.Classes.Add("the-class-you-want").
I've been doing some basic view theming with Drupal 6, but I'm having a difficult time figuring out how to access certain variables. Here is my setup:
I have one view with several block displays.
I three templates I'm using to override the default:
views-view-unformatted-my-list-blocks.tpl.php (styles template)
views-view-my-list-blocks.tpl.php (rows template)
views-view-fields-my-list-blocks-block-1.tpl.php (an example display template)
Now, if I just copy the default code into the templates, everything seems to display as it should. But I noticed that in my styles template, the title variable is there, but nothing comes out. Even when I set my display title in basic settings, nothing shows. I would also like to access my CSS class variable from the basic settings, but I'm not sure what variable to use for that either.
Can anyone shed some light on these?
Here is an example on doing this
http://www.expresstut.com/content/themeing-views-drupal-6
http://www.expresstut.com/content/themeing-views-drupal-6-part-2
I would like to replace the style of custom table.
By using
fooTable.setStyleName("v-tableII");
produces the following result
<div class="v-table v-table-v-tableII v-tableII" ...
(grrr)
It would be important to replace the 'v-table' style because it belongs to another customized table.
Is there any way using different styles for different tables ?
(The help recommends to using addStyle, but the original 'v-table' style is tailored to another custom table )
Thanks for answers in advance.
Cs
This is how vaadin works and you will always have that. You are using the correct option fooTable.setStyleName("v-tableII") but have you remember to add this to your css file? In some cases you might have to set !important on some of the options.