Hi, 

I was looking into a way to modify the border-top color of tables in XWiki
(defined in table.less) such that all basic tables have a solid 1px black
top border (instead of the current solid 1px #ddd definition). I've been
having trouble with finding a proper way to apply the style only to basic
tables. Here are a few approaches I have taken:

*Approach 1.* Override the tables.less file in our own tables_overrides.less
and make all tables have a black 1px border. 
*Problem:* This selector is too general, and adds a black border to all
tables on the page (History pane, Format guide, etc)
 
*Approach 2.* Narrow the selector down to #xwikicontent (only the user’s
content). #xwikicontent .table
*Problem:* Now all tables in the xwikicontent div have borders and nowhere
outside; however, other tables (such as those used by live tables) are also
selected, making the LiveTables look wrong.
 
*Approach 3.* Modify only the source where the border-color is defined
(because table styles simply use @table-border-color variable to define the
default border-top style
*Problem:* XWiki uses tables throughout (i.e. History pane) and these tables
also use @table-border-color, making their border-top black as well.
 
*Approach 4.* Create a new table class (i.e. class=“bordered”) so that we
can specifically select tables defined by CKEditor and nothing else. Hook
into CKEditor table dialog and set Stylesheet Classes to “bordered” by
default
*Problem:* Users creating tables via source editor will have no context of
adding borders to their table and their tables will not have proper borders
by default
 
As of now, there does not seem to be any clear cut way of selecting only the
basic tables (because so many other parts of XWiki use that basic table). I
was wondering if anyone has any insight on a possible solution to this
issue. Thanks!



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Changing-border-top-color-of-basic-tables-tp7599949.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to