Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS issue with horizontal tabs nested inside vertical tabs #38289

Open
skurvish opened this issue Jul 17, 2022 · 5 comments
Open

CSS issue with horizontal tabs nested inside vertical tabs #38289

skurvish opened this issue Jul 17, 2022 · 5 comments

Comments

@skurvish
Copy link

skurvish commented Jul 17, 2022

Steps to reproduce the issue

I have a vertical tabset and on each tab of this vertical tabset I have a horizontal tabset. The CSS rules appear to be applied differently between the site view and the admin view. On the admin view parts of the vertical CSS is being applied to the horizontal tabs.

Expected result

The tabs should be rendered the same in both views.

Actual result

They are not. The styling of the horizontal tabs tabs do not match the vertical ones. Furthermore, on the site view there is a gap between the vertical tabset and the tab data that it points to.

System information (as much as possible)

Basically a vanilla version of Joomla 4.1.5. I am working on modifying a component from J3 to J4.

Additional comments

I am attaching a number of screen images of the resulting rendering. Below is the actual markup I am using in both cases:

<?php

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

//HTMLHelper::_('bootstrap.tab'); // Does not appear to be needed.

echo HTMLHelper::_('uitab.startTabSet', 'vertical', ['active'=>'details', 'orientation'=>'vertical']);
	echo HTMLHelper::_('uitab.addTab', 'vertical', 'vertical1', 'Vertical 1');
		echo HTMLHelper::_('uitab.startTabSet', 'v1horizontal', ['active'=>'v1h1', 'orientation'=>'horizontal']);
			echo HTMLHelper::_('uitab.addTab', 'v1horizontal', 'v1h1', 'V1 Horizontal 1');
				echo "Hello from V1 Horizontal 1";
			echo HTMLHelper::_('uitab.endTab');
			echo HTMLHelper::_('uitab.addTab', 'v1horizontal', 'v1h2', 'V1 Horizontal 2');
				echo "Hello from V1 Horizontal 2";
			echo HTMLHelper::_('uitab.endTab');
			echo HTMLHelper::_('uitab.addTab', 'v1horizontal', 'v1h3', 'V1 Horizontal 3');
				echo "Hello from V1 Horizontal 3";
			echo HTMLHelper::_('uitab.endTab');
		echo HTMLHelper::_('uitab.endTabSet');
	echo HTMLHelper::_('uitab.endTab');
	echo HTMLHelper::_('uitab.addTab', 'vertical', 'vertical22', 'Vertical 2');
		echo HTMLHelper::_('uitab.startTabSet', 'v2horizontal', ['active'=>'v2h1', 'orientation'=>'horizontal']);
			echo HTMLHelper::_('uitab.addTab', 'v2horizontal', 'v2h1', 'V2 Horizontal 1');
				echo "Hello from V2 Horizontal 1";
			echo HTMLHelper::_('uitab.endTab');
			echo HTMLHelper::_('uitab.addTab', 'v2horizontal', 'v2h2', 'V2 Horizontal 2');
				echo "Hello from V2 Horizontal 2";
			echo HTMLHelper::_('uitab.endTab');
			echo HTMLHelper::_('uitab.addTab', 'v2horizontal', 'v2h3', 'V2 Horizontal 3');
				echo "Hello from V2 Horizontal 3";
			echo HTMLHelper::_('uitab.endTab');
		echo HTMLHelper::_('uitab.endTabSet');
	echo HTMLHelper::_('uitab.endTab');
echo HTMLHelper::_('uitab.endTabSet');

Site View.png : Note that the tab for V1 Horizontal 1 is styled correctly. Also note the gap between the vertical tabset and the tab data to the right of it.

Site View Styles.png : Note the styles

Admin View.png : Note that the tab for V1 Horizontal 1 is styled incorrectly. Also note there is no gap as there was on the Site View.

Admin View Styles.png : Note the styles. You will see that on the button of the selected Horizontal tab on the third style down it is showing orientation=vertical. This can't be right.

@brianteeman
Copy link
Contributor

the css of the site and admin templates is not identical

@skurvish
Copy link
Author

When I look at the styles being applied the only file that is applying the CSS is joomla-tab.css and it is the file site and admin.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38289.

@skurvish
Copy link
Author

But yes, the templates are different but I don't see how the template can affect the orientation=vertical part being applied. But I am no CSS expert by any stretch.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38289.

@skurvish
Copy link
Author

I note that com_config has a similar structure to what I am attempting to accomplish. The lefthand navigation bar is created manually rather than through a vertical tabset. Might that be because the combination of vertical and horizontal was not working as I am seeing, or that they wanted to do something beyond the capabilities of the HTMLHelper uiTab system?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38289.

@chmst
Copy link
Contributor

chmst commented Jul 18, 2022

What you call vertical tab set (the left sidbar) in the backend is an accessible dropdown menu, not a tabset. This was quite another concept.

@Hackwar Hackwar added the bug label Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants