PDA

View Full Version : [UNKNOWN][3.1] css for right/center-aligned cols same as left-aligned cols



abraxxa
8 Jan 2010, 7:54 AM
Ext version tested:


Ext 3.1.0



Adapter used:


ext



css used:


only default ext-all.css



Browser versions tested against:


FF3 (firebug 1.4.5 installed)



Operating System:


Ubuntu 9.10 x86_64



Description:


Test Case:



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
</head>
<link rel="stylesheet" type="text/css" href="./extjs/resources/css/ext-all.css" />
<body>
<div id="main">
</div>
</body>
<script type="text/javascript" src="./extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="./extjs/ext-all-debug.js"></script>
<script type="text/javascript">
Ext.onReady(function(){
new Ext.grid.GridPanel({
title:'test',
columns:[
{header:"Right", dataIndex:'right', align:'right'},
{header:"Center", dataIndex:'center', align:'center'},
{header:"Left", dataIndex:'left', align:'left'}
],
store:new Ext.data.ArrayStore({
fields:[
{name:'left'},
{name:'center'},
{name:'right'}
],
data:[
['left-value', 'center-value', 'right-value'],
]
}),
renderTo:'main'
});
});
</script>
</html>
Steps to reproduce the problem:


load the page
look at the padding (with firebug) of the inner div's in the cells


The result that was expected:


right aligned cells have the larger padding (5px instead of 3px for the other three directions) on the right side instead of on the left like left aligned cells do
center aligned cells have the larger padding on both sides


The result that occurs instead:


all three have 5px left-padding and 3px right-padding



Screenshot or Video:


none



Debugging already done:


looked at the used css with firebug



Possible fix:


The padding for the grid cell should be different based on the alignment. I assume a new, alignment dependent css class instead of .x-grid3-hd-inner is needed.