implementation for the Layout Misalignment in Safari for Custom Exam … #120
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…Sheet #101
Fixes #101
The issue was not only with safari i have faced the same issue with the firefox too, Below are the changes described in the code.
What was changed?
In the CustomExamSheetComponent.tsx of the application, modifications were made to the CSS for the exam generation feature. The updates include changes to the .questions-container, where the column-count was reduced from 4 to 2, and the column-fill property was changed from auto to balance to ensure a more balanced distribution of content across columns, and also used the webkit with property avoid, Additionally the width of the .questions-container and .info-container was adjusted to better fit the reduced column count.
Webkit properties for CSS columns: Adjustments were made to how columns break to prevent layout issues specifically in browsers like Safari and Firefox.
Why was it changed?
The changes were implemented to address several layout issues observed in Firefox and Safari where:
Questions in the exam sheet were misaligned.
The changes were implemented to address layout issues within the generated exam sheets. Previously, questions were distributed unevenly. The new column settings ensure a more aesthetically pleasing and functional layout by balancing the distribution of questions across the available space.
How was it changed?
File Modified: CustomExamSheetcomponent.tsx
In .questions-container:
column-count was changed from 4 to 2 to reduce the number of columns.
column-fill was changed from auto to balance to ensure even distribution of content across the columns.
The width property was added and set to 230px to better control the layout with the new column configuration.
In .info-container:
The width was adjusted from 350px to 250px to align with the changes in layout and ensure it does not overlap or create unnecessary white space.
Added -webkit-column-break-inside: avoid; for better control in WebKit-based browsers, ensuring that questions do not split across columns.
Added -webkit-column-fill: balance; to complement the standard column-fill property in the .questions-container. This ensures that the column content distribution works as expected in WebKit-based browsers.
Used -webkit-column-count: 2; alongside the standard column-count for consistent behavior across browsers.
Applied -webkit-column-break-inside: avoid; to .question to prevent breaks within a question across columns, particularly in WebKit browsers. This is crucial for maintaining a coherent question layout during the display and print processes.
Screenshots that show the changes (if applicable):
Previous screenshots-
![Screenshot (191)](https://private-user-images.githubusercontent.com/152373497/385146751-ec48e247-ecee-4582-a269-efd7db045258.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwOTc1NzIsIm5iZiI6MTczOTA5NzI3MiwicGF0aCI6Ii8xNTIzNzM0OTcvMzg1MTQ2NzUxLWVjNDhlMjQ3LWVjZWUtNDU4Mi1hMjY5LWVmZDdkYjA0NTI1OC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwOVQxMDM0MzJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03OWRkOTIyZjMwMTZjODMyMDAzYjhiMWQ3NjMxNzZiMDk4ZDFmN2ZjMjM2ZmI2N2ZjOWYzNDlhZGY1NTZhMjIzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.D60ZJLSthAgM-l8B8ikPdWGGVVg0IaC_D7kLgWgx5Gk)
![Screenshot (192)](https://private-user-images.githubusercontent.com/152373497/385146755-700fa263-2ac5-4098-add8-5220c72c6712.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwOTc1NzIsI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MzJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xYmZjNTNhZmQ2YzM5ZTg0MzkzYmFmZjYwZjFjOWEyYzM2ZjU2ZWZmZDI3YzYyMjZlOTAyNzgxMmEwMmJhNDQ3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.0-lHHafvTghVIq0VJDF8qMrg0j5ny_fsqiUqy-93oSw)
![Safari previous](https://private-user-images.githubusercontent.com/152373497/385161088-1da855ec-3f31-4118-8ca7-e3e2ca9dab42.jpeg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwOTc1NzIsIm5iZiI6MTczOTA5NzI3MiwicGF0aCI6Ii8xNTIzNzM0OTcvMzg1MTYxMDg4LTFkYTg1NWVjLTNmMzEtNDExOC04Y2E3LWUzZTJjYTlkYWI0Mi5qcGVnP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDlUMTAzNDMyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YmZkN2E0MDJhZjc1ZDVmMjUzYTRiOTIxYTRhN2FkMzAxOTJmZmYzYjQ3NjMxNTJkMDM1YzYyYzg0MjliNTYyZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.Q6s61XDXJI3ByTEx1c4i975tnui8ho5HAFTLxmEoanY)
After updating code screenshots-
![Screenshot (197)](https://private-user-images.githubusercontent.com/152373497/385161255-cb89a50d-10c1-4bde-890d-9c5ae063118c.png?jwt=eyJhbGciOiJIUz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jivtwzLXvI8PA)
![Safari updated](https://private-user-images.githubusercontent.com/152373497/385161437-81fe167a-f2a3-494c-8249-55f7a078d14e.jpeg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwOTc1NzIsIm5iZiI6MTczOTA5NzI3MiwicGF0aCI6Ii8xNTIzNzM0OTcvMzg1MTYxNDM3LTgxZmUxNjdhLWYyYTMtNDk0Yy04MjQ5LTU1ZjdhMDc4ZDE0ZS5qcGVnP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDlUMTAzNDMyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MzYzZDU5NGQ5NjMyMjYwMDA0ZWI3M2U1YjliZTBiOWI0MmE3NThlZDQxZWM5MTEwMGNmZjcyZWY2NmQ5OTI1NiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.xWh4jNYK_dpJxpq-sJXJLHhjjx7y3asqwDVhNaYGlEw)
Note- Make sure to keep the full screen of safari and firefox browser before printing now the custom exam sheet can print the questions-continer without overlapping with the student-info continer you can print with A4,A3 sheets without any issue.